Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
All colors in Office documents are grayscale, how do I see colors JT Excel Discussion (Misc queries) 1 February 2nd 10 02:13 PM
Used drawing colors in shapes....lost default colors for "Fill Col Lai704 Excel Discussion (Misc queries) 1 August 20th 08 04:45 AM
Worksheet formatting (fill colors & text colors) disappeared sweettooth Excel Discussion (Misc queries) 2 June 24th 08 01:16 AM
Lost highlighting and font colors; background colors on web pages Jan in Raleigh Excel Discussion (Misc queries) 2 July 31st 07 09:10 PM
Can't format font colors or cell fill-in colors canoeron Excel Discussion (Misc queries) 3 August 22nd 05 11:46 PM


All times are GMT +1. The time now is 11:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"