You can broaden the approach in this example:
http://peltiertech.com/Excel/Charts/AxisScaleLinkToSheet.html
This works on one specified chart:
Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Address
Case "$E$2"
ActiveSheet.ChartObjects("Chart 1").Chart.Axes(xlCategory) _
.MaximumScale = Target.Value
Case "$E$3"
ActiveSheet.ChartObjects("Chart 1").Chart.Axes(xlCategory) _
.MinimumScale = Target.Value
Case "$E$4"
ActiveSheet.ChartObjects("Chart 1").Chart.Axes(xlCategory) _
.MajorUnit = Target.Value
Case "$F$2"
ActiveSheet.ChartObjects("Chart 1").Chart.Axes(xlValue) _
.MaximumScale = Target.Value
Case "$F$3"
ActiveSheet.ChartObjects("Chart 1").Chart.Axes(xlValue) _
.MinimumScale = Target.Value
Case "$F$4"
ActiveSheet.ChartObjects("Chart 1").Chart.Axes(xlValue) _
.MajorUnit = Target.Value
Case Else
End Select
End Sub
This works on all charts on the active sheet:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim iChart As Long
Dim cht As Chart
For iChart = 1 To ActiveSheet.ChartObjects.Count
Set cht = ActiveSheet.ChartObjects(iChart).Chart
Select Case Target.Address
Case "$E$2"
cht.Axes(xlCategory).MaximumScale = Target.Value
Case "$E$3"
cht.Axes(xlCategory).MinimumScale = Target.Value
Case "$E$4"
cht.Axes(xlCategory).MajorUnit = Target.Value
Case "$F$2"
cht.Axes(xlValue).MaximumScale = Target.Value
Case "$F$3"
cht.Axes(xlValue).MinimumScale = Target.Value
Case "$F$4"
cht.Axes(xlValue).MajorUnit = Target.Value
Case Else
End Select
Next
End Sub
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. -
http://PeltierTech.com
_______
"(e-mail address removed)"