title: Put code inside a loop to exit the loop after any mouse click
body: <p>On a Userform, I'm blinking a frame Off/On by toggling its visiblity.  It blinks a variable number of times and then stops, but in between blinks it checks for user activity.  If there has been a mouse click anywhere on the form or on any of the contained controls then the blinking stops immediately.</p>
  
  <p>This is what my blinker looks like. </p>
  
  <pre><code>  For i = 1 To numberOfBlinks
      &lt;blink twice&gt;
       DoEvents
      If &lt;click detected&gt; Then Exit Sub  
    Next i
  </code></pre>
  
  <p>Everything works fine except for the <code>&lt;click detected&gt;</code> part.  How do I do that from inside the loop?</p>