You need to look carefully at both event macros and determine which lines in the one macro trigger the other event to fire
In Selection_Change look for
- lines which amend the values in any cells in the same worksheet
- every value being updated triggers Worksheet_Change
In Worksheet_Change look for
- any lines which select or activate cells in the same worksheet
- each Select/Activate triggers Worksheet_Change
Having determined what is causing the problem then amend the code so that EnableEvents is set to False before the unwanted trigger happens
Without seeing the code, I cannot tell you where the line should go
- but try placing this early in both macros unless any of the triggers are required
Code:
Application.EnableEvents = False
Try placing this as the last line in both macros
Code:
Application.EnableEvents = True
Important
- you MUST evaluate at possible exit routes out of both macros and make sure that EnableEvents is always set to True
Code:
If A = X Then
Exit Sub
Else
Target.Offset(, 3 ) = A
End If
[I][COLOR=#006400]' some other code etc[/COLOR][/I]
End Sub
now becomes
Code:
If A = X Then
GoTo Handling
Else
Target.Offset(, 3 ) = A
End If
[I][COLOR=#006400]' some other code etc[/COLOR][/I]
Handling:
Application.EnableEvents = True
End Sub
Something else to reduce triggers is to avoid selecting cells in Worksheet_Change
- cells do not require selecting to be amended