Convert color codes

  • Thread starter Thread starter XP
  • Start date Start date
X

XP

Using Office 2003 and Windows XP;

Suppose I have color code: #C5C2B9

How can I convert the above code to a value that can be used in MS-Access
for the background color of a control?

Please post example code if possible, thanks.
 
XP said:
Using Office 2003 and Windows XP;

Suppose I have color code: #C5C2B9

How can I convert the above code to a value that can be used in MS-Access
for the background color of a control?


You can do it manually in the Immediate window:

?CLng(&HC5C2B9)

If you have a text field or a string variable with the Hex
number, then use:

lngColor = CLng("&H" & strHex)
 
Back
Top