Function HTMLtoRGB(HtmlCode As String) As String
If Left(HtmlCode, 1) = "#" Then
HtmlCode = Right(HtmlCode, 6) 'A
End If
RED = Left(HtmlCode, 2)'A
GREEN = Mid(HtmlCode, 3, 2)'A
BLUE = Right(HtmlCode, 2)'A
RgbHex = "&H00" + BLUE + GREEN + RED
HTMLtoRGB = "&" & Val(RgbHex)'A
End Function
Private Sub Command1_Click()'A
MsgBox HTMLtoRGB("0000FF")'A
End Sub