title: End all macro on keypress
body: <p>I am trying to add a line to my code that will end it when for example, the <kbd>ESC</kbd> key is pressed.</p>
  
  <p>I've managed to get the others to work, and some sites out there say that the following/similar would work, though I find the opposite to be true.</p>
  
  <pre><code>Sub CellMover()
  
      Application.OnKey "{ESC}", End
  
      Application.OnKey "{UP}", "MoveUp"
  
      Application.OnKey "{DOWN}", "MoveDown"
  
      Application.OnKey "{LEFT}", "MoveLeft"
  
      Application.OnKey "{RIGHT}", "MoveRight"
  
  End Sub
  </code></pre>
  
  <p>My hopes would be that when I press <kbd>ESC</kbd>, the next time(s) I press any of the arrow keys, it doesn't then also run the associated macros.</p>