Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default halt macro execution, inspect progress and then resume execution

I would like to halt the execution of a complex macro at a specific
location in the code and then navigate around several worksheets
(maybe even look at some different workbooks) and after I'm done
inspecting I would like to resume the macro execution at the same
point where it was halted.

What is the recommended method for doing something like this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 829
Default halt macro execution, inspect progress and then resume execution

"John" wrote:
I would like to halt the execution of a complex macro at a specific
location in the code and then navigate around several worksheets
(maybe even look at some different workbooks) and after I'm done
inspecting I would like to resume the macro execution at the same
point where it was halted.
What is the recommended method for doing something like this?


You can sprinkle Stop statements at key junctures in your macros.

Alternatively, you can set breakpoints by pressing F9 with the cursor
hovering over a statement. You can also use F8 step through the code and
ctrl+F8 to run to the statement where the cursor is hovering.

If your macros loops, you can pause execution randomly by pressing
ctrl+alt+Pause (on my computer).

Alternatively, you might at logic to execute the Stop statement when a
certain condition is met, for example when an iteration counter is a
specific value.

Press F5 when you are ready to resume execution.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Speeding up execution of a Macro QuietMan Excel Programming 4 December 21st 07 09:13 PM
Macro Execution C Brandt Excel Discussion (Misc queries) 2 July 13th 07 07:23 AM
Halt Macro Execution PeteN Excel Programming 9 July 12th 07 01:45 PM
Progress Meter during macro execution Rob[_21_] Excel Programming 7 June 22nd 04 06:36 PM


All times are GMT +1. The time now is 10:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"