Hi Gang, ...any clues on this one?
I want to change the the gridline scale of a chart via VBA...
When I record the steps, excel gives me this code
yet excel will not run it.
error: #1004 (unable to set the minimumscaleisauto property of the axis class)
'----------------------------------------------
sub set_axes
ActiveSheet.ChartObjects("Chart 3"
.Activate
ActiveChart.ChartArea.Select
ActiveChart.Axes(xlValue).MajorGridlines.Select
With ActiveChart.Axes(xlValue)
.MinimumScaleIsAuto = True
.MaximumScale = 100
.MinorUnit = 1
.MajorUnitIsAuto = True
.Crosses = xlAutomatic
.ReversePlotOrder = False
.ScaleType = xlLinear
.DisplayUnit = xlNone
End With
end sub
I want to change the the gridline scale of a chart via VBA...
When I record the steps, excel gives me this code
yet excel will not run it.
error: #1004 (unable to set the minimumscaleisauto property of the axis class)
'----------------------------------------------
sub set_axes
ActiveSheet.ChartObjects("Chart 3"
ActiveChart.ChartArea.Select
ActiveChart.Axes(xlValue).MajorGridlines.Select
With ActiveChart.Axes(xlValue)
.MinimumScaleIsAuto = True
.MaximumScale = 100
.MinorUnit = 1
.MajorUnitIsAuto = True
.Crosses = xlAutomatic
.ReversePlotOrder = False
.ScaleType = xlLinear
.DisplayUnit = xlNone
End With
end sub