MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

What's the best way to kill a macro when it is till running?

  Asked By: Leon    Date: Dec 14    Category: MS Office    Views: 3273

I tried to Ctrl+Alt+Del but sometimes it crashed my computer.
Sometimes the machine simply didn't respond.

So, what's the safest and nicest way to kill a macro when it is
still running?

How to write a macro that shows the processing of a running macro?



3 Answers Found

Answer #1    Answered By: Dominic Murphy     Answered On: Dec 14

CTRL+Break (Pause Key) is the best method to stop a macro  while it is
running. However, when I write  a new macro and I am not sure what it is
going to do, I run it in step mode until I know it is working correctly.

I also recommend that you read through Greg's article on Debugging
Techniques to help you get a handle on perfecting your code.

Answer #2    Answered By: Jeffrey Washington     Answered On: Dec 14

being a bit forward maybe but there is an article on working in
the VBE at


Answer #3    Answered By: Landra Schmidt     Answered On: Dec 14

you can use the ESC key which is the same as CTRL+Break. There is one caveat
though. You can disable this function by code, then there is no way to stop a

BTW, if you disable features like EnableCancelKey, DisplayAlert, ScreenUpdating
and StatusBar, you have to make sure they are enabled again at the end of your
code and your error trapping routines.