I have an Excel macro that works just fine. However, in certain cases, the macros can run for a VERY long time, producing many sheets with 500k rows per sheet.

If I sense that the data is such that the macro will keep running for a very long time, I open the Task Manager and kill the Excel process. This works, but isn't exactly pretty. Question: I know that I could put a Cancel button on the userform, but my fear is that given the processing that is going on, if the button were clicked, this click would not be handled until the processing is done.

Any suggestions?