G
Guest
I know its possible to put change events in individual sheets in a file. But
if I want to trigger a macro based on changes in every sheet in a file. For
example, the code below tracks the changes to A1 on a sheet that are greater
than 100. What if I wanted to track this same outcome but on all sheets in a
workbook. Can you do this without pasting the same change event code snippet
in each sheet.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" And Target > 100 Then
MsgBox ("Changed Value")
End If
End Sub
Thanks
EM
if I want to trigger a macro based on changes in every sheet in a file. For
example, the code below tracks the changes to A1 on a sheet that are greater
than 100. What if I wanted to track this same outcome but on all sheets in a
workbook. Can you do this without pasting the same change event code snippet
in each sheet.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" And Target > 100 Then
MsgBox ("Changed Value")
End If
End Sub
Thanks
EM