PDA

View Full Version : How to define my own standard colors?



oleval
01-12-2008, 09:28 AM
Hi All,

I would like to have an add-in with its own color pattern. How to do this? Has someone an example at hand? Very much appreciated.

Alexander

Bob Phillips
01-12-2008, 10:06 AM
Tools>Options>Color allows you to modify the colour pallette, so just go in and change them, then save that workbook.

oleval
01-14-2008, 12:56 AM
I need to set up it in the vba code. What are the command I have to use for this? Is there some infor detailing this?

Bob Phillips
01-14-2008, 01:29 PM
ActiveWorkbook.Colors(54) = RGB(255, 0, 102)

oleval
01-15-2008, 12:15 AM
Thank you!
Can you advise which colox box out of those depicted in the dialog box (Tools>Option>Colors) will have the color like this (if my code is ActiveWorkbook.Colors(54) = RGB(255, 0, 102))? How to define the colors for fills and lines?

Bob Phillips
01-15-2008, 01:23 AM
That applies to all colours, there is only one 56 colour pallette.

Paul_Hossler
01-15-2008, 07:25 PM
Good writeup and example of the standard 56 colors

http://support.softartisans.com/kbview_1205.aspx


Be aware that someone else may have redefined one of the colors in the palette, and since cell and graph fills/lines use the .ColorIndex property, and not the .Color property, you'll get the current color for e.g. 54

Paul

oleval
01-15-2008, 11:41 PM
Thank you, Paul!