Thread: Excel Colors
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Excel Colors

Is there something that I can write to get the name of the color :

Not that I know of

--
Regards Ron de Bruin
http://www.rondebruin.nl



wrote in message oups.com...

Thanks Ron

I guess i didn't communicate properly. I'm able to fill the color in
the cell that I need - I just want to have a way of knowing the name
associated with the color index

So if activecell is red, then I can write (in the immediate window)

?activecell.interior.colorindex, and I get 3


Is there something that I can write to get the name of the color :

activecell.inteior.colorNAME? Is there anything like that available?

Of course, one knows the colors just by looking at them (so I know it's
red) - but I was curious to see if one can access color names in the
color pallete. These become visible if you point your mouse on to a
specific color, and let it hover for a second.

thanks again for your patience

s




Ron de Bruin wrote:
Hi

http://www.mvps.org/dmcritchie/excel/colors.htm
Excel only recognizes names for Color 1 through 8 (Black, White, Red, Green, Blue, Yellow, Magenta, and Cyan).

You can use
ActiveCell.Interior.Color = vbRed


--
Regards Ron de Bruin
http://www.rondebruin.nl



wrote in message ups.com...
hi

I've used the ColorIndex Property to manage colors in my spreadsheets
before. So activecell.Interior.colorindex = 5 will shade the activecell
with certain shade of Blue.

Is there anyway to access the NAME associated with the color? I can see
the name when I used the color pallete - you select a color, keep your
mouse over it, and in a second or so, it gives you a label. How does
one access that label/name using VBA?

thanks
s