Prevent user interrupting Macro ?

JumboCactuar

Well-known Member
Joined
Nov 16, 2016
Messages
609
Hi,
i have a macro which depending on data size, can take up to 2 minutes to complete.

Now ive found if whilst this is running the user gets impatient and clicks the mouse / keyboard etc.. then i get "excel not responding"

--

Is there any way to prevent this? Was thinking maybe a userform box that pops up whilst its running and closes on finish but unsure how to integrate this

Thanks for any help
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
30,127
Office Version
365
Platform
Windows
You could put this at the start of the code
Code:
   UserForm1.Show vbModeless
and then this at the end
Code:
   Unload UserForm1
It won't stop idiots, but might deter some
 

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
7,676
Office Version
2007
Platform
Windows
You can put your macro, maybe we can improve it a bit.
 

Forum statistics

Threads
1,077,650
Messages
5,335,501
Members
399,020
Latest member
julianjjh1

Some videos you may like

This Week's Hot Topics

Top