Convert color codes

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.
 
M

Marshall Barton

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top