Barb,
You can adapt the following code:
Dim R As Long
Dim G As Long
Dim B As Long
Dim RGBLong As Long
R = &H10
G = &H20
B = &H30
RGBLong = RGB(R, G, B)
Debug.Print Hex(RGBLong)
R = RGBLong And &HFF
G = (RGBLong And &HFF00&) \ &H100&
B = (RGBLong And &HFF0000) \ &H10000
Debug.Print Hex(R), Hex(G), Hex(B)
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
On Mon, 6 Apr 2009 08:04:15 -0700, Barb Reinhardt
<(E-Mail Removed)> wrote:
>I've seen this somewhere, but can't find it now. Can someone direct me to
>the formulas to convert to R/G/B components.
>
>Thanks,
>Barb Reinhardt