Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for this Tom, some useful stuff on here!
Pete "Tom Ogilvy" wrote: Here is a good general reference for the colors although he hasn't added the color names for the charts. http://www.mvps.org/dmcritchie/excel/colors.htm -- Regards, Tom Ogilvy "Peter Rooney" wrote in message ... Bob, Thanks for this - the code will be most useful. The palette shows colors for values 1 to 16 and 33-56 but 17-31 (not on the palette) also return colors and these are the ones I was puzzled by. I hate being a completeist! :-) Regards Pete "Bob Phillips" wrote: Pete, No you cannot do that easily, as the names are not stored anywhere (AFAIK). A few colours have VB constant values, such as vbRed, vbBlue, and so on, but these are very few. You could pick up the colorindex value and translate that, but anyone can change a colour. If you want to go the translation route, here is a starter for you Private Const xlCIBlack As Long = 1 Private Const xlCIWhite As Long = 2 Private Const xlCIRed As Long = 3 Private Const xlCIBrightGreen As Long = 4 Private Const xlCIBlue As Long = 5 Private Const xlCIYellow As Long = 6 Private Const xlCIPink As Long = 7 Private Const xlCITurquoise As Long = 8 Private Const xlCIDarkRed As Long = 9 Private Const xlCIGreen As Long = 10 Private Const xlCIDarkBlue As Long = 11 Private Const xlCIDarkYellow As Long = 12 Private Const xlCIViolet As Long = 13 Private Const xlCITeal As Long = 14 Private Const xlCIGray25 As Long = 15 Private Const xlCIGray50 As Long = 16 Private Const xlCIPlum As Long = 18 Private Const xlCILightTurquoise As Long = 20 Private Const xlCISkyBlue As Long = 33 Private Const xlCILightGreen As Long = 35 Private Const xlCILightYellow As Long = 36 Private Const xlCIPaleBlue As Long = 37 Private Const xlCIRose As Long = 38 Private Const xlCILavender As Long = 39 Private Const xlCITan As Long = 40 Private Const xlCILightBlue As Long = 41 Private Const xlCIAqua As Long = 42 Private Const xlCILime As Long = 43 Private Const xlCIGold As Long = 44 Private Const xlCILightOrange As Long = 45 Private Const xlCIOrange As Long = 46 Private Const xlCIBlueGray As Long = 47 Private Const xlCIGray40 As Long = 48 Private Const xlCIDarkTeal As Long = 49 Private Const xlCISeaGreen As Long = 50 Private Const xlCIDarkGreen As Long = 51 Private Const xlCIBrown As Long = 53 Private Const xlCIIndigo As Long = 55 Private Const xlCIGray80 As Long = 56 -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Peter Rooney" wrote in message ... Good morning, all! Is there any way in VBA to trap the name of the interior.colorindex values, so, for any selection, I can msgbox the name of the fillcolor e.g. Red, Blue, Rose, Tan etc? The reason for this is that colors 17 to 32 can also be used, but they're not on the toolbar palette, and I want to know if Excel has names for them. Yes, I KNOW I need to get out more! :-) Thanks in advance! Pete |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is there a way to count cells in a range based on fill color? | Excel Worksheet Functions | |||
Formula to count the cells in a range that have a fill color. | Excel Discussion (Misc queries) | |||
Formula to count the cells in a range that have a fill color. | Excel Discussion (Misc queries) | |||
Identifying the Active Fill Color | Excel Discussion (Misc queries) | |||
Identifying the Active Fill Color | Excel Programming |