View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
ilia ilia is offline
external usenet poster
 
Posts: 256
Default Adjust series order in Excel 2007

There is a property you can set in the Series object to move to
secondary axis. The following line will move the first series of the
active chart to the secondary axis:

ActiveChart.SeriesCollection(1).AxisGroup = xlSecondary

If you want to change the order of their appearance, you have to do it
by chart group. This code will cause the first series of the first
chart group of the active chart to be plotted second:

ActiveChart.ChartGroups(1).SeriesCollection(1).Plo tOrder = 2

Hope that helps.

On Dec 13, 10:59 am, MikeM_work
wrote:
We are trying to automate the creation of a column chart with two data
series, wherein one of the series is attached to the secondary axis. We
create two additional 'dummy' or blank series with zero values (two series
attached to primary axis; two series attached to secondary axis) so the
secondary column series does not 'jump' in front of the primary column series.

We cannot dictate the order of the series on the worksheet to the user, so
we need to be able to adjust the series order.

Does anyone know the code to manipulate the series order in Excel 2007?

Thank you very much.

Mike