The following lines were added (+) and removed (-):
=== Convert RGB Hex (like used in HTML) to VB Hex ===Code Sample: Public Function h2v(wHex As String) As Long Dim strTmp As String wHex = Trim("" & wHex) If Len(wHex) = 7 Then If Left(wHex, 1) = "#" Then wHex = Right(wHex, 6) End If If Len(wHex) = 6 Then strTmp = "&H" & Right(wHex, 2) & Mid(wHex, 3, 2) & Left(wHex, 2) & "&" Else strTmp = "&H000000&" End If h2v = Val(strTmp) Debug.Print h2v End Function