i have tried several ways, but i always get an overflow error :(
how can i combine the ARGB color elements?
Public Function ARGB(ByVal alpha As Byte, ByVal red As Byte, ByVal green As Byte, ByVal blue As Byte) As Long
Dim color As Variant
color = CDec(alpha) * 256 ' Alpha
color = (color * 256) + CDec(red) ' Red
color = (color * 256) + CDec(green) ' Green
color = CDec((color * 256) + CDec(blue)) ' Blue
ARGB = CDec(color) 'overflow error
End Function