Setting the Max scale by variables?


Posted by Joe on August 17, 2001 12:34 PM

I want to automatically set the scale max point.

Example:
Dim Scale1
Scale1 = Range("w35").Value

'Once I have the chart selected I want to set
.MaximumScale to equal the variable Scale1

With ActiveChart.Axes(xlValue)
.MinimumScaleIsAuto = True
.MaximumScale = Scale1



Posted by Damon Ostrander on August 17, 2001 9:40 PM

Hi Joe,

It looks like your code should work. What exactly is the problem? Is it simply that you do not want to manually select the chart? If so, just change your With statement to:

With ActiveSheet.ChartObjects(1).Chart.Axes(xlValue)

where the (1) refers to the chart index (or you can replace it with the name of the chart).

Damon