SOLVED

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

%3CLINGO-SUB%20id%3D%22lingo-sub-2265115%22%20slang%3D%22en-US%22%3EHow%20can%20I%20interrupt%20a%20long-running%20macro%20in%20Excel%20360%20on%20a%20Mac%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2265115%22%20slang%3D%22en-US%22%3E%3CP%3EAny%20thoughts%3F%20%26nbsp%3BThe%20interwebs%20are%20strangely%20silent%20on%20the%20matter.%3C%2FP%3E%3CP%3EJust%20want%20to%20kill%20it%2C%20but%20preferably%20not%20blow%20away%20Excel%20itself.%20%26nbsp%3BAll%20the%20toolbar%20buttons%20are%20grey%20or%20unresponsive.%20%26nbsp%3BExcel%20reports%20100%25%20cpu%20(one%20of%20them%20I%20presume%20-%20the%20others%20are%20presumably%20shooting%20hoops%20or%20reading%20Schopenhauer%20while%20they%20wait%20for%20something%20useful%20to%20do.)%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EExcel%20is%2016.47.1%20(probably%20the%20lastest%20Excel%20from%20Microsoft%20365)%3C%2FP%3E%3CP%3EMac%20OS%20is%20Mojave.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2265115%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%20on%20Mac%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional 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 (Occasional 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.