I'm trying to get a macros to run in sheet 2 when sheet1 is active and a value is reached in a cell in sheet 1. I can not get my VBA code to work:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Worksheets("Sheet1").Range("E18").Value Then
If Target.Value = 0 Then MinMacros
If Target.Value = "x" Then MaxMacros
End If
End Sub
I have several Macros running in the first sheet that all work well. An example of one of the if then event changes would be:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$H$61" Then
If Target.Value = 0 Then minimizeControls
If Target.Value = "x" Then maximizeControls
End If
The object of the macros is to minimize non important data when the cell is blank or = 0. and maximize important data when the cell is = to "x".
Thanks for the help.
Bookmarks