SOLVED

How can I interrupt a long-running macro in Excel 360 on a Mac?

Copper Contributor

Any thoughts?  The interwebs are strangely silent on the matter.

Just want to kill it, but preferably not blow away Excel itself.  All the toolbar buttons are grey or unresponsive.  Excel reports 100% cpu (one of them I presume - the others are presumably shooting hoops or reading Schopenhauer while they wait for something useful to do.)


Excel is 16.47.1 (probably the lastest Excel from Microsoft 365)

Mac OS is Mojave.

4 Replies
best response confirmed by Ploughguy (Copper Contributor)
Solution

@Ploughguy 

Try pressing Esc or Command+. (point)

If that doesn't work, Excel is executing a "tight" loop that can only be interrupted by quitting Excel.

Yep - tried both of those. I have yet to find a situation where they actually do something.

Having to blow up Excel to stop a macro seems a bit 20th Century. They should get an intern to work or the problem as a holiday project...

Thanks for the help, though. It gives some reassurance that the problem is at their end rather than at my end.

@Ploughguy 

You can insert a line

 

DoEvents

 

inside a loop. This will slow down execution slightly, but it will ensure that you can interrupt code execution by pressing Command+. or Esc.

Well I never. Well, not until now.

This looks like one of those things that seemed like a good idea in the 1990s but now just evokes dreadful pangs of remorse.

Hans, thank you! I will bury it in every loop.

A preference setting that enables a check after every statement (as it should always have been) sounds like a useful Christmas wish. And just for completeness, Events Off and Events On.
1 best response

Accepted Solutions
best response confirmed by Ploughguy (Copper Contributor)
Solution

@Ploughguy 

Try pressing Esc or Command+. (point)

If that doesn't work, Excel is executing a "tight" loop that can only be interrupted by quitting Excel.

View solution in original post