Microsoft Office Development and Consultancy
|Excel > Charts > VBA Code > Formatting||< Previous | Next >|
There are two ways you can assign a particular colour to the interior of a series.
You can either use the .ColorIndex property or the .Color property.
You should always use the Colorindex and never the Color
The reason for this is because the Color property is not accurate
If you assign a colour that is not on the colour palette then it will not be assigned
Excel will scan the colour palette and will assign a colour from the colour palette which it thinks is the closest match.
This is not a problem in 2007 as the chart colours can be completely independent from the active theme.
ColorIndex not Color
Another reason you should always use the colorindex property in 2003 is because the automatic conversion from colour to colorindex is not 100% accurate
For example if you add the colour RGB(69,85,96) to the colour palette and then assign this colour using RGB it will actually use colorindex (5) instead and not the colour you specified.
There is not a single line of code that will change the font of the whole chart (ie for all the different chart elements)
This does not appear in the intellisense
|© Better Solutions Limited 06-Dec-2013||< Previous | Top | Next >|