Thread: ColorConstants
View Single Post
  #2   Report Post  
Juan Pablo González
 
Posts: n/a
Default

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