Turn on secondary axis

E

Edward Ulle

I've search and tried everything I can think of to turn on the secondary
axis. I've even recorded a macro to see what Excel does but no luck.

Set c = Charts.Add
With c
.HasAxis(xlValue, xlSecondary) = True
.Axes(xlValue, xlSecondary).CategoryType = xlAutomatic
End With


I get "Method 'Axes' of objecty '_Chart' failed".

What am I doing wrong?

*** Sent via Developersdex http://www.developersdex.com ***
 
E

Edward Ulle

Sorry folks. I figured it out.

I guess you can't have a secondary axis until you have one or maybe
multiple series in your chart.

I moved the code down after the series were created and voila it works.




*** Sent via Developersdex http://www.developersdex.com ***
 

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