One option is to have the command button add text to a random cell when clicked (for example, add an "x" to cell Z1. Then you can add a test to the Worksheet_Change Event.

A quick example:

If Range("Z1") <> "x" then
  'Run the code
End If