MarkerBackgroundColorIndex = xlAutomatic

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If I create a chart in my code and I do not specifically set the
MarkerBackgroundColorIndex for the series it is set to xlAutomatic by default.

How can I extract the actual colorindex that excel chooses?

Debug.Print ActiveChart.SeriesCollection(I).MarkerBackgroundColorIndex

just gives me the code for xlAutomatic (-4105 I believe).

Thanks
The Doctor
 
In a bog standard chart, xlAutomatic (-4105) colours for
series lines are applied in series order starting at with
the colour assigned to colorindex 25.

So the automatic colour, both for the line and markers in
Series 3, where series 3 was the third series created,
would (normally) be the same as #27. If a series is
deleted and a new one added, the auto colour takes the
first unused colorindex from #25 on. There are one or two
other things that can contradict what I've described.

With Bar type series and those that can be "filled",
automatic colours start at #17.

In a chart with a single series with "Vary colors by
point", again automatic point colors are applied starting
from #25.

Regards,
Peter
 

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

Back
Top