ji********@comp umarc.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 HexByteToDecima l(strValue As String) As Integer
Dim strChar1 As String
Dim strChar2 As String
Dim intChar1 As Integer
Dim intChar2 As Integer
'Input check omitted
HexByteToDecima l = 0
strChar1 = Left(strValue, 1)
strChar2 = Right(strValue, 1)
If IsNumeric(strCh ar1) Then
intChar1 = CInt(strChar1)
Else
intChar1 = Asc(UCase(strCh ar1)) - Asc("A") + 10
End If
If IsNumeric(strCh ar2) Then
intChar2 = CInt(strChar2)
Else
intChar2 = Asc(UCase(strCh ar2)) - Asc("A") + 10
End If
HexByteToDecima l = 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