title: How to stop VBA code running?
body: <p>Say I have a button embedded into my spreadsheet that launches some VBA function.</p>
  
  <pre><code>Private Sub CommandButton1_Click()
      SomeVBASub
  End Sub
  
  Private Sub SomeVBASub
      DoStuff
      DoAnotherStuff
      AndFinallyDothis
  End Sub
  </code></pre>
  
  <p>I'd like to have an opportunity to have some sort of a "cancel" button  that would stop <code>SomeVBASub</code> execution at an arbitrary moment, and I'm not into involving <code>Ctrl+Break</code> here, 'cause I'd like to do it silently.</p>
  
  <p>I guess this should be quite common issue, any ideas?</p>
  
  <p>Thanks.</p>