So I have a macro, but if a certain condition is met, I want the rest of it to stop running. How do I fix the code below? Currently, it keeps going.
Sub ABC()
If Range("D1") = "XXX" Then
MsgBox "WARNING"
Application.EnableEvents = False
End If
[rest of macro]
End Sub
Sub ABC()
If Range("D1") = "XXX" Then
MsgBox "WARNING"
Application.EnableEvents = False
End If
[rest of macro]
End Sub