Format Graph axis


Posted by Mike on January 17, 2002 10:05 AM

Does anyone know if it is possible to dynamically scale the y axis of a line graph without using the autoscale option. I'd like to link the "y" axis scales to referenced cells



Posted by Damon Ostrander on January 17, 2002 10:39 AM

Hi Mike,

It is easy to scale the axes in a VBA macro. Here is an example directly out of the VBA helps:

With Charts("Chart1").Axes(xlValue)
.MinimumScale = 10
.MaximumScale = 120
End With

You would just need to set the values from your referenced cells.

Damon