Assume an Excel worksheet with two vba Sub procedures:
Sub1: A handler on worksheet changes
Private Sub Worksheet_Change(ByVal Target As range) 'do something End SubSub2: A
Subwhich runs when clicking a button
When a user clicks the Sub2-button while editing a cell, both Subs are executed in the order Sub2 (because he clicked the button) -> Sub1 (because the edit action was terminated).
How can I reverse this order? I want to handle the worksheet change before running the Sub associated to the clicked button.
Both Subs must remain unrelated. Ie. if the Sub2-button is clicked and no cell editing is going on, only Sub2 should be executed.