Hi,
Perhaps someone can help me with this:
In Excel 2003, I've created a macro that automatically sets the minimum and maximum Y-axis scale in a bar chart, based on a calculated cell in the sheet.
below is the macro: FL_REGION is the name of the graph, FL_REGION_MIN is the named cell for the minimum, FL_REGION_MAX is the named cell for the maximum.
ActiveSheet.ChartObjects("FL_REGION").Activate
ActiveChart.Axes(xlValue).Select
With ActiveChart.Axes(xlValue)
ActiveChart.ChartArea.Select
.MinimumScale = ActiveSheet.Range("FL_REGION_MIN").Value
.MaximumScale = ActiveSheet.Range("FL_REGION_MAX").Value
End With
Unfortunately, in Excel 2010, the Y-axis is not adjusted anymore, it keeps the original numbers.
Anyone any idea how I should change the macro?
Thanks.
Wims
Perhaps someone can help me with this:
In Excel 2003, I've created a macro that automatically sets the minimum and maximum Y-axis scale in a bar chart, based on a calculated cell in the sheet.
below is the macro: FL_REGION is the name of the graph, FL_REGION_MIN is the named cell for the minimum, FL_REGION_MAX is the named cell for the maximum.
ActiveSheet.ChartObjects("FL_REGION").Activate
ActiveChart.Axes(xlValue).Select
With ActiveChart.Axes(xlValue)
ActiveChart.ChartArea.Select
.MinimumScale = ActiveSheet.Range("FL_REGION_MIN").Value
.MaximumScale = ActiveSheet.Range("FL_REGION_MAX").Value
End With
Unfortunately, in Excel 2010, the Y-axis is not adjusted anymore, it keeps the original numbers.
Anyone any idea how I should change the macro?
Thanks.
Wims