Hi - I have a number of cells that have been named (ie cells I4 and J4 are also called "_BottomF" and "_TopF"). I have some code that looks like this:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Address = "$H$4" Or Target.Address = "$I$4" Then
If Worksheets("Type3").Range("_BottomF") < Worksheets("Type3").Range("_TopF") Then
'set new bounds
ActiveSheet.ChartObjects("Type3BoostPhase").Chart.Axes(xlCategory).MinimumScale = Worksheets("Type3Boost").Range("_BottomF")
ActiveSheet.ChartObjects("Type3BoostPhase").Chart.Axes(xlCategory).MaximumScale = Worksheets("Type3Boost").Range("_TopF")
End If
End If
Application.EnableEvents = True
End Sub
I would like to replace the "$H$4" with "_BottomF", but I get an error message. What is the correct way of doing this?
Thanks!
edit: Title was supposed to be Using, not Ssing!
Bookmarks