Fungsi css decompress untuk editing
Option ExplicitContoh penggunaan fungsi css decompress untuk editing
Public Function CSSDecompress(sText As String) As String
Dim sTextCSS As String
Dim arrCSS() As String
Dim i As Integer
sTextCSS = CSSDelSpace(sText)
sTextCSS = Replace(sTextCSS, "{", "{" & vbCrLf)
sTextCSS = Replace(sTextCSS, "}", "}" & vbCrLf & vbCrLf)
sTextCSS = Replace(sTextCSS, ";", ";" & vbCrLf)
CSSDecompress = sTextCSS
End Function
Private Function CSSDelSpace(sText As String) As String
Dim sTextCSS As String
sTextCSS = sText
sTextCSS = Replace(sTextCSS, " ", "")
sTextCSS = Replace(sTextCSS, vbCrLf, "")
CSSDelSpace = sTextCSS
End Function
Private Sub Command2_Click()
Text1.Text = CSSDecompress(Text1.Text)
End Sub