Need macro that will BREAK a running macro

G

grime

I have a macro that runs, and its pretty lengthy. I would like to
create a macro that I will attach to a Command Button that will stop a
macro that is currently running. One that works in the same way the
break key works. I tried using the SendKeys {Break} but that didn't
seem to work.

Is it possible to run a macro while another is running?
What's the code to do what I am looking to do?

Thanks in advance for any help,
 
B

Bob Phillips

That is because until the macro suspends, the toolbar button has no effect.
Catch-22.

What you can do is to add DoEvents throughout the code, which yields
execution so that the operating system can process other events.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top