Colors in VBA

  • Thread starter Thread starter Brennan
  • Start date Start date
B

Brennan

Hello:

I am writing some VBA code that will change the forecolor
of some report controls based upon a given condition. I
need about 7 colors. Where can I get a list of how to
refernce colors via VBA. So far I have used vbRed,
vbBlack and vbBlue. I tried vbPurple but it didn't work.

Any help would be appreciated

Brennan
 
I usually change a control on a form to the desired color and then copy the
number from the property to the code.
 
If you type vbRed in the search box of the Object Browser window you
will get:
vbBlack
vbBlue
vbCyan
vbGreen
vbMagenta
vbRed
vbWHite
vbYellow

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Brennan said:
Hello:

I am writing some VBA code that will change the forecolor
of some report controls based upon a given condition. I
need about 7 colors. Where can I get a list of how to
refernce colors via VBA. So far I have used vbRed,
vbBlack and vbBlue. I tried vbPurple but it didn't work.

Use the RGB function and you can invent your own colors.
 
Back
Top