I want to call a macro when a cell in the range H2:FAX changes (for all sheets), where X is the last row. However I can't get the event macro posted in ThisWorkbook to call the macro consistently. I did get it to work a couple times by chance, and it worked fine for a while and then suddenly started crashing excel. Here is the code:
Any help would be greatly appreciated.
VBA Code:
Private Sub Workbook_SheetChange2(ByVal Sh As Object, ByVal Target As Range)
Dim lr As Long
lr = Application.WorksheetFunction.CountA(Columns("A"))
Dim rng As Range
Set rng = Range("H2", Cells(lr, "FA"))
If Not Intersect(Target, rng) Is Nothing Then
Call check
End If
End Sub
Any help would be greatly appreciated.