Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.