How do I get the Red Green and Blue values out of a string like this:
&H00C0FFFF&
I know it is possible, but I can't find it. Can someone help me?
Thnx in advance
Printable View
How do I get the Red Green and Blue values out of a string like this:
&H00C0FFFF&
I know it is possible, but I can't find it. Can someone help me?
Thnx in advance
C0FFFF is the RGB portion. use mid to strip it out & then to separate the components (into C0, FF, and FF), if you wish.
there's lots of threads with code on these forums, just do a search. :)
VB Code:
lngColor = &H00C0FFFF& Red = (lngColor And &HFF) Green = (lngColor And &HFFFF&) / &H100 Blue = (lngColor And &HFFFFFF) / &H10000