Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using code to stop a macro.
In VBA, is there any way you can write a macro that can
stop another macro currently executing. I have a macro that loops for over 30 minutes. I would like to be able to write another macro that allows me to neatly stop the first macro. I can't see anything in VBA that allows you to do this - especially since it doesn't seem possible to launch a second macro (using a macro button) when another macro is still executing. Is there a work-around? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using code to stop a macro.
If have dominion over the long-running macro code, you can modify it to
check the status of something, like a key press, cell value or an environment variable, and exit if the status attains a certain value. If the macros has a form, you can implement a cancel function. But, no you cannot start one Excel macro that will end another. "Wrightr" wrote in message ... In VBA, is there any way you can write a macro that can stop another macro currently executing. I have a macro that loops for over 30 minutes. I would like to be able to write another macro that allows me to neatly stop the first macro. I can't see anything in VBA that allows you to do this - especially since it doesn't seem possible to launch a second macro (using a macro button) when another macro is still executing. Is there a work-around? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Stop window saying code execution interrupted at startup? | Excel Discussion (Misc queries) | |||
How to stop printing the VB Code Result | Excel Discussion (Misc queries) | |||
stop code execution | Excel Programming | |||
VB Code to stop cells being deleted | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |