Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working on Excel macros on OS X. I am fairly new to Excel, so I commonly encounter infinite loops.

How can I interrupt a running macro subroutine without killing the process?

share|improve this question
up vote 1 down vote accepted

In the Visual Basic Editor, if this is happening to you a lot, get in the habit of creating a counter inside your loop that increments on each loop and set a Watch that Breaks when it changes value, or reaches a value.

Setting a Break point somewhere such as the Next, or Do Loop will at least enable you not kill things completely.

Also the Break key is triggered with the [apple]+[.] the apple button along with the period button combination, but always setting up a way out of the loop should be your practice until you have debugged thoroughly

share|improve this answer
Thanks. I will try it out. :) – thinkanotherone Sep 16 '11 at 20:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.