Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Customizing colors
Hi! I've used the following code to change the cell color. Sub dfghrth() ActiveCell.Interior.Color = RGB(221, 255, 221) End Sub But instead of actually changing to the color I've defined, it changes to a pallette default color... Help anyone? -- pmguerra ------------------------------------------------------------------------ pmguerra's Profile: http://www.excelforum.com/member.php...o&userid=14986 View this thread: http://www.excelforum.com/showthread...hreadid=542600 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Customizing colors
A worksheet can only display 56 predefined colors (the palette).
You will need to redefine the palette to provide the colors you need or you will get the behavior you describe. http://www.mvps.org/dmcritchie/excel/colors.htm A posible workaround is to use a shape/autoshape instead of a cell as these can display more simultaneous colors. -- Regards, Tom Ogilvy "pmguerra" wrote: Hi! I've used the following code to change the cell color. Sub dfghrth() ActiveCell.Interior.Color = RGB(221, 255, 221) End Sub But instead of actually changing to the color I've defined, it changes to a pallette default color... Help anyone? -- pmguerra ------------------------------------------------------------------------ pmguerra's Profile: http://www.excelforum.com/member.php...o&userid=14986 View this thread: http://www.excelforum.com/showthread...hreadid=542600 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Customizing colors
You have to change the pallette, Excel has no more than 56 colors to work
with: If ActiveCell.Interior.ColorIndex 2 Then _ ActiveWorkbook.Colors(ActiveCell.Interior.ColorInd ex) = _ RGB(221, 255, 221) HTH. Best wishes Harald "pmguerra" skrev i melding ... Hi! I've used the following code to change the cell color. Sub dfghrth() ActiveCell.Interior.Color = RGB(221, 255, 221) End Sub But instead of actually changing to the color I've defined, it changes to a pallette default color... Help anyone? -- pmguerra ------------------------------------------------------------------------ pmguerra's Profile: http://www.excelforum.com/member.php...o&userid=14986 View this thread: http://www.excelforum.com/showthread...hreadid=542600 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
All colors in Office documents are grayscale, how do I see colors | Excel Discussion (Misc queries) | |||
Used drawing colors in shapes....lost default colors for "Fill Col | Excel Discussion (Misc queries) | |||
Worksheet formatting (fill colors & text colors) disappeared | Excel Discussion (Misc queries) | |||
Lost highlighting and font colors; background colors on web pages | Excel Discussion (Misc queries) | |||
Can't format font colors or cell fill-in colors | Excel Discussion (Misc queries) |