Private Function CvtColorVB2Web(colorcode As String) As _
String
Dim vcolor
vcolor = Hex(Val(colorcode))
If Len(vcolor) < 6 Then
vcolor = String(6 - Len(vcolor), "0") & vcolor
End If
CvtColorVB2Web = Mid(vcolor, 5, 2) & Mid(vcolor, 3, 2) _
& Mid(vcolor, 1, 2)
End Function
Private Function CvtColorWeb2VB(colorcode As String) As _
String
If Len(colorcode) < 6 Then
colorcode = colorcode & String(6 - Len(colorcode), _
"0")
End If
CvtColorWeb2VB = "&H" & Mid(colorcode, 5, 2) & _
Mid(colorcode, 3, 2) & Mid(colorcode, 1, 2)
End Function
|