Referencing the secondary y axis scale values

  • Thread starter Thread starter Ken Ramirez
  • Start date Start date
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!
 
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)
 
Back
Top