|
06-21-2023, 06:27 AM
Soraka
Pause / Resume a looped macro with a button
Hello,
So after trying this, my macro that goes on loop still works correctly, but the button to Pause it does not have any effect on it. I thought I did it correctly. What am I missing?
06-21-2023, 06:42 AM
davesexcel
Re: Pause / Resume a looped macro with a button
I don't think you can run a separate macro while another is already running.
Xlorate.com, , YouYube Channel
06-21-2023, 07:13 AM
ByteMarks
Re: Pause / Resume a looped macro with a button
In your loop, try adding DoEvents before checking the state of Pause.
I guess GoTo LabelEnd stops the routine, so one way to resume could be to have some sort of counter which is saved to a public variable. Then, when you resume it can start at the next iteration. Last edited by ByteMarks; 06-21-2023 at 11:52 AM.
|




