Getting the RGB color of a chart line

R

Ronald

Hi,

I'm using a simple line chart in Excel 2000. I'm triing to get the
line color of the series. With the next statement:

mChart.SeriesCollection(iChart).Interior.colorindex

As a result I get -4105 and -4142! But these values are not allowed in
Colors (index function)

If I use ...Interior.Color I'll get 0 for all the line, and they are
blue and green etc.

So is there an other way to retrieve the colors used by the
ChartObject?

Ronald
 
A

Andy Pope

Hi Ronald,

To get the RGB colour value use,
mChart.SeriesCollection(iChart).Border.Color

The -4105 is the xlAutomatic constant.

Cheers
Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top