ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pausing and resuming a running macro (https://www.excelbanter.com/excel-programming/371301-pausing-resuming-running-macro.html)

brian

Pausing and resuming a running macro
 
Is there a way to pause a running macro at a certain stage of its execution
and to then to resume it? Thanks for any help.

TIA
Brian



Patricia Shannon

Pausing and resuming a running macro
 
The Wait method will pause

Important The Wait method suspends all Microsoft Excel activity and may
prevent you from performing other operations on your computer while Wait is
in effect. However, background processes such as printing and recalculation
continue.

To be able to exit a subroutine and return to it while keeping the variables
from being reinitialized, make the subroutine Static.

"brian" wrote:

Is there a way to pause a running macro at a certain stage of its execution
and to then to resume it? Thanks for any help.

TIA
Brian




Bob Phillips

Pausing and resuming a running macro
 
You could add a wait

Application.Wait Now + TimeValue("0:00:10") ' 10 secs

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"brian" wrote in message
...
Is there a way to pause a running macro at a certain stage of its

execution
and to then to resume it? Thanks for any help.

TIA
Brian






All times are GMT +1. The time now is 04:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com