Runaway Macros!

  • Thread starter Thread starter shy1162
  • Start date Start date
S

shy1162

I have a macro with nested loops and some times it does no want to
stop. Hitting ESC does not always work right away. Can I put a command
inside the loop to pause and look for the ESC key?
 
I have a macro with nested loops and some times it does no want to
stop. Hitting ESC does not always work right away. Can I put a command
inside the loop to pause and look for the ESC key?

Did you use Doevents inside at least one of the loops, if not each loop?


Discussions that may be interesting:

http://www.mrexcel.com/forum/showthread.php?t=19342

http://www.blog.methodsinexcel.co.uk/2008/10/22/do-events-examples-in-vba/

http://www.mrexcel.com/forum/showthread.php?t=36052


Definition of DoEvents in Visual Basic for Applications

http://support.microsoft.com/kb/118468

Mike
 
I have a macro with nested loops and some times it does no want to
stop. Hitting ESC does not always work right away. Can I put a command
inside the loop to pause and look for the ESC key?

As ALWAYS, post your code for comments
 
I have a macro with nested loops and some times it does no want to
stop. Hitting ESC does not always work right away. Can I put a command
inside the loop to pause and look for the ESC key?

No.
 
Back
Top