Re: Convert color codes



XP wrote:

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)

--
Marsh
MVP [MS Access]
.



Relevant Pages

  • Re: Change Task Background color in Calendar View
    ... > background color of any task event in Calendar View. ... > color code "FYI" dates entered as a task gray. ... > ability to change the background color of any cell (each cell ...
    (microsoft.public.project)
  • Outlook "Organize", "Using Colors" messages list color options
    ... visually find messages if I could color code not just the foreground color of ... text but also the background color of the message summary list. ... most of the colors are useless because they don't show up well in front of a ... white background. ...
    (microsoft.public.outlook.general)
  • Color Coding in a Drop Down List
    ... Is there an easy way in MS Excel 2003 to color code the values in a drop ... selected and displayed in the cell. ... I would like the background color of the box to be green, read, and yellow ...
    (microsoft.public.excel)