ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Referencing the secondary y axis scale values (https://www.excelbanter.com/excel-programming/280297-referencing-secondary-y-axis-scale-values.html)

Ken Ramirez

Referencing the secondary y axis scale values
 
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!


steve

Referencing the secondary y axis scale values
 
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)

--
sb
"Ken Ramirez" wrote in message
...
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!





All times are GMT +1. The time now is 06:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com