Greetings,
I have a bar graph with the y-axes expressed in percent. The minimum percent value is always 0%. However, the maximum percent value can exceed 100%. Sometimes, depending on the data, if I set the y-axes maximum scale for Auto, the chart may have a scale that is less than 100%. I want to make sure that the y-axes is at least 0% to 100% ... more than 100% is OK.
I am trying this VBA without success. I get a run-time error without specifics. Here is the code ....
Appreciate any help.
Thanks,
Steve
I have a bar graph with the y-axes expressed in percent. The minimum percent value is always 0%. However, the maximum percent value can exceed 100%. Sometimes, depending on the data, if I set the y-axes maximum scale for Auto, the chart may have a scale that is less than 100%. I want to make sure that the y-axes is at least 0% to 100% ... more than 100% is OK.
I am trying this VBA without success. I get a run-time error without specifics. Here is the code ....
Code:
ChartObjects("percentfunding_chart").Activate
ActiveChart.Axes(xlValue).MaximumScaleIsAuto = False
If ActiveChart.Axes(x1Value).MaximumScale < 1 Then
ActiveChart.Axes(x1Value).MaximumScale = 1
Else
ActiveChart.Axes(xlValue).MaximumScaleIsAuto = True
End If
Appreciate any help.
Thanks,
Steve