Function RGBA2Hex(R As Byte, G As Byte, B As Byte, A As Byte) As String
Dim lRGB As Long
Dim lColor As Long
lRGB = RGB(R, G, B)
lColor = (lRGB And &HFF00&) Or (lRGB And &HFF0000) \ &H10000 Or (lRGB And &HFF) * &H10000
If A < 128 Then
If A < 0& Then A = 0&
lColor = lColor Or A * &H1000000
Else
If A > 255& Then A = 255&
lColor = lColor Or (A - 128&) * &H1000000 Or &H80000000
End If
RGBA2Hex = Hex(lColor)
End Function
[CODE]
RBS