ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel Colors (https://www.excelbanter.com/excel-programming/376584-excel-colors.html)

[email protected]

Excel Colors
 
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


Ron de Bruin

Excel Colors
 
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




Peter T

Excel Colors
 
With Enum you can name your own constants (n/a in XL97).

Bob Phillips has compiled such a list
http://tinyurl.com/ycpnzy

Regards,
Peter T

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




[email protected]

Excel Colors
 

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



Ron de Bruin

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





[email protected]

Excel Colors
 

Perfect!

this helps...thanks
c


Peter T wrote:
With Enum you can name your own constants (n/a in XL97).

Bob Phillips has compiled such a list
http://tinyurl.com/ycpnzy

Regards,
Peter T

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



Jim Cone

Excel Colors
 
Just in case there is an interest, the free Excel add-in
"Determine Colors" provides a listing of the colors used in the cell
by right-clicking it - background, borders, font, pattern (and sheet tab).
May be of greatest usefulness to color blind Excel users. Download from ...
http://www.realezsites.com/bus/primitivesoftware
No registration required.
--
Jim Cone
San Francisco, USA


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



All times are GMT +1. The time now is 04:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com