I've got some code that is driving an axis scale based on a few cells. What I would like to do is have the axis be driven by calculated cells instead. I'm thinking I need to change the code below to worksheet_calculate, but (if you haven't guessed already), I'm not sure of the changes that need be made.
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Address
Case "$HN$19"
ActiveSheet.ChartObjects("Chart 561").Chart.Axes(xlCategory) _
.MaximumScale = Target.Value
Case "$V$19"
ActiveSheet.ChartObjects("Chart 561").Chart.Axes(xlCategory) _
.MinimumScale = Target.Value
Case Else
End Select
End Sub
Help?
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Address
Case "$HN$19"
ActiveSheet.ChartObjects("Chart 561").Chart.Axes(xlCategory) _
.MaximumScale = Target.Value
Case "$V$19"
ActiveSheet.ChartObjects("Chart 561").Chart.Axes(xlCategory) _
.MinimumScale = Target.Value
Case Else
End Select
End Sub
Help?