Sub test3()
Dim R&, G&, B&
coul_XL_to_RGB vbMagenta, R, G, B
MsgBox "RGB (" & Join(Array(R, G, B), " , ") & ")"
End Sub
Function coul_XL_to_RGB(couleur, R, G, B)
'fonction HTMLCOLOR ---> By Patricktoulon
Dim str0 As String
str0 = Right("000000" & Hex(couleur), 6): R = Val("&H" & Right(str0, 2)): G = Val("&H" & Mid(str0, 3, 2)): B = Val("&H" & Left(str0, 2))
End Function