Thread: ColorConstants
View Single Post
  #3   Report Post  
George Nicholson
 
Posts: n/a
Default

There is also a set of constants for the settings governed by the windows
color pallete: i.e., a constant that translates to the "window caption bar
backcolor/forecolor", "disabled control backcolor/Forecolor", " tooltips
backcolor/forecolor", etc. The idea being that you could use the "Disabled
textbox backcolor" constant in code/property settings and you will get
whatever color the user's window palette calls for: grey, red, etc.

I have a hardcopy of this list somewhere (circa 97, several dozen items) but
when I've tried to find it again on MSKB, I never could....

Not much help, I know...
--
George Nicholson

Remove 'Junk' from return address.


"Juan Pablo González" wrote in message
...
My understanding is that this enumeration is different than the 56 color
palette that Excel uses. Their RGB representation ends up being the same
(for the 8 colors that are available as a constant), but it's not the same
thing.

I guess another reason is that you can customize the color palette in
Excel, so that ColorIndex 1 is now something completely different than the
"standard" one. Then, any "builtin" constant that said that ColorIndex 1
was, say, red, would be wrong.

--
Regards,

Juan Pablo González
Excel MVP

"Bill Martin" wrote in message
...
Searching through the Excel97 VBA Help system for something else, I came
across the entry for ColorConstants. It says:

The ColorConstants module contains predefined color constants.
These constants can be used anywhere in your code.

This sounds useful to me, but where in heck does one find the
"ColorConstants module"? It doesn't seem to automatically appear
anywhere and doing a search of my entire disk for some file of that name
returns nothing. Also searching the Microsoft website for
"Colorconstants" returns nothing.

I have stumbled into the fact that I can use ColorConstants.vbMagenta for
example to set a color, but the drop down list only shows 8 "vb" colors.

Bill