How would I do....

roborro

New member
Local time
Today, 09:50
Joined
Aug 6, 2005
Messages
9
The code below is taking a field in a report and change the text(forecolor) to red. Now I need to have that text in a color that is not list for use in VBA. The color I am looking for is dark green. Can I use a numeric value? And if so what would be the format.

[Labor Cost].ForeColor = vbRed
 
You can use color values ie. numbers.
As you know, a textbox has a forecolor property.
If you assign a "custom color" to this property,
that color would be expressed in numbers.

That is the number you use instead of vbRed or whatever vbcolor
you are using.
 
Thank You but ...

Ok how do you input color codes in to VBA the below example is where it is now.

[Labor Cost].ForeColor = vbRed

when I look at the Define Custom Colors I get red = 0, green = 111 blue= 0 so the number associated with dark green is 01110? how do I put it into my code?

[Labor Cost].ForeColor = ?
 

Users who are viewing this thread

Back
Top Bottom