I have currently written a macro for changing a charts axis linked to a cell but this needs me to run the macro for the effects to take place. Is there away that will change the axis automatically when the number in the reference cell is changed. Below is the macro I have written
Code:
Sub ChangeAxisScales()
With ActiveSheet.ChartObjects("Chart 6").Chart
' Category (X) Axis
With .Axes(xlCategory)
.MaximumScale = ActiveSheet.Range("$B$4").Value
.MinimumScale = Worksheets("Sheet2").Range("$A$2").Value
.MajorUnit = Worksheets("Sheet2").Range("$A$3").Value
End With
' Value (Y) Axis
With .Axes(xlValue)
.MaximumScale = ActiveSheet.Range("$B$3").Value
.MinimumScale = Worksheets("sheet2").Range("$A$2").Value
.MajorUnit = Worksheets("Sheet2").Range("$A$3").Value
End With
End With
End Sub