Referencing the Seconday Y axis scale values in code

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!
 
A

Andy Pope

Hi Ken,

Code generated via macro recorder.

Sub Macro1()
' The Excel constants are
' xlValue = 2
' xlSecondary = 2
'
ActiveChart.Axes(xlValue, xlSecondary).Select
With ActiveChart.Axes(xlValue, xlSecondary)
.MinimumScale = 1
.MaximumScale = 4
.MinorUnitIsAuto = True
.MajorUnitIsAuto = True
.Crosses = xlAutomatic
.ReversePlotOrder = False
.ScaleType = xlLinear
.DisplayUnit = xlNone
End With
End Sub


Ken said:
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!

--

Cheers
Andy

http://www.andypope.info
 

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