Public Function GetHexColor(strHex As String) As Long
'converts Hex string to long number, for colors
'the leading # is optional
'example usage
'Me.iSupplier.BackColor = HexColor("FCA951")
'Me.iSupplier.BackColor = HexColor("#FCA951")
'the reason for this function is to programmatically use the
'Hex colors generated by the color picker.
'The trick is, you need to reverse the first and last hex of the
'R G B combination and convert to Long
'so
|