I need to do some operations on a cell after user input. Right now, I'm doing something like this:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Target.Worksheet.Range("H5")) Is Nothing Then MyMacro
End Sub
The problem is that MyMacro
is also changing the cell, recursively invoking Worksheet_Change
, leading to a stack overflow.
How can I avoid that and still be able to work on the cell from my macro?