Referencing the secondary y axis scale values

K

Ken Ramirez

Does anyone know how to Reference the Seconday Y axis
scale values in code? I am automating a spreadsheet that
uses a chart and i need to adjust these values at run
time. I'm using Visual Basic.

Thanks!
 
S

steve

Ken,

ActiveChart.Axes(xlValue, xlSecondary).Select
With ActiveChart.Axes(xlValue, xlSecondary)
.MinimumScale = ymin
.MaximumScale = ymax
.MinorUnitIsAuto = True
.MajorUnit = yunit
.CrossesAt = 0
.ScaleType = xlLinear
End With

Pick and choose what you want. Watch the variables.

(You can get this code by using the macro recorder)
 

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