ji********@compumarc.com wrote:
It lets me pick a RGB colors
^
|
omit
I must be tired.
One more note. The form code uses decimal numbers such as 255 12 302
for the RGB values. To convert the numbers to hexadecimal instead use
the Hex() function. To convert from letters to numbers you can do
something like:
Public Function HexByteToDecimal(strValue As String) As Integer
Dim strChar1 As String
Dim strChar2 As String
Dim intChar1 As Integer
Dim intChar2 As Integer
'Input check omitted
HexByteToDecimal = 0
strChar1 = Left(strValue, 1)
strChar2 = Right(strValue, 1)
If IsNumeric(strChar1) Then
intChar1 = CInt(strChar1)
Else
intChar1 = Asc(UCase(strChar1)) - Asc("A") + 10
End If
If IsNumeric(strChar2) Then
intChar2 = CInt(strChar2)
Else
intChar2 = Asc(UCase(strChar2)) - Asc("A") + 10
End If
HexByteToDecimal = intChar1 * 16 + intChar2
End Function
Perhaps there's an API function that does this since it's used so
often. I know a HexFromBin API function exists.
James A. Fortune