VBA Tip: Disable Events


If you need to execute a part of code without triggering any event, place the code between these two lines:

Sub example()

    Application.EnableEvents = False ' => disable events
    
    'The code ...
    
    Application.EnableEvents = True ' => enable events
    
End Sub