It's 2003
Main Topics
Browse All TopicsI'm trying to format a chart in VBA. I'm trying to assign a color to a chart series using RGB, (code below) but the colors are not coming out as expected. Can anyone help?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Paul,
Excel 2003 is very limited in terms of which colors it can use. You may have to modify your color palette
to introduce that new color, and then use that color in your chart.
General background on Excel color palette:
http://www.mvps.org/dmcrit
How to change the color palette:
http://support.microsoft.c
http://office.microsoft.co
An add-in to manage colors (not free):
http://www.office-addins.c
http://www.ablebits.com/ex
Regards,
Patrick
Paul,
Comments on the macro:
'resets the general colour palette by replacing the first colour - Colors(1) - in the colour palette with your chosen colour
ActiveWorkbook.Colors(1) = RGB(79, 129, 189)
'selects/activates the chart
ActiveSheet.ChartObjects("
'recolours the chart series by using the first colour in the colour palette Colors(1) which is the ColorIndex = 1
ActiveChart.SeriesCollecti
In fact you could select any of the 56 colours in the palette to replace with your selected colour and then use that in the re-colouring of the chart series.
This all works with Excel 2002 so it should also work with Excel 2003
Patrick(A-B)
Business Accounts
Answer for Membership
by: matthewspatrickPosted on 2009-07-21 at 15:10:53ID: 24909868
Hello PaulHews,
Which version of Excel, Paul? I am guessing 2003 or earlier; in 2007, the color palette is massively expanded.
Regards,
Patrick