I have an Excel macro that takes an exceedingly long time. It seems to crash Excel (I get a Not Responding message in the taskbar) when I leave it unattended, but if I put a breakpoint that gets hit every five or ten seconds, it’s OK. Trouble is, I’ll need to step on from the breakpoint about a quarter of a million times (we’re looking at about 200 hours to execute this beast)
I’m guessing that the absence of message pump activity is antagonising the kernel, so how might I flush the message queue? Or am I barking up the wrong tree entirely?
I’m very new to this, by the way, so documentation references will be very welcome.
Cheers,
Guy
Seconding the opinion that 200h is a bit worrying, however you can try the
DoEventsstatement which “surrenders execution of the macro so that the operating system can process other events“. (Note that callingDoEventshas an additional time penalty)