April 2006
Beginner
1114 pages
98h 16m
English
axis.MaximumScale [= setting]
For value axes, sets or returns the maximum value for the axis. Setting this property automatically sets MaximumScaleIsAuto to False. The following code sets the maximum and minimum axis values on a chart to match the maximum and minimum values in the source data range [PriceHistory]:
Sub ScaleValueAxis( )
Dim chrt As Chart, ax As Axis
Set chrt = Charts("Stock Price History")
Set ax = chrt.Axes(xlValue, xlPrimary)
ax.MaximumScale = WorksheetFunction.Max(Range("PriceHistory"))
ax.MinimumScale = WorksheetFunction.Min(Range("PriceHistory"))
End SubRead now
Unlock full access