Mouse Movement Freezes VBA Routine, and Screen Saver Causing Problems too

rkaczano

Board Regular
Joined
Jul 24, 2013
Messages
62
I am having issues with my VBA routine freezing at run time.

I have a very large dictionary (over a million keys) that is pulling down the performance of my routine. And I am noticing that if I move my mouse during the routine that I get the "Not Responding" message on my userform status bar. Sometimes it crashes the routine - sometimes not. But it is hit and miss. I am trying to stabilize the routine during runtime.

Also, when my screen saver comes on, this too can freeze my routine. I need to trigger a mouse movement or bypass the screen saver, altogether.

Any ideas on how to fix these two issues?
 

Some videos you may like

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

mole999

Moderator
Joined
Oct 23, 2004
Messages
10,295
Office Version
2019, 2016, 2013
Platform
Windows
do you run any mouse enhancement software for gaming et al
 

rlv01

Well-known Member
Joined
May 16, 2017
Messages
721
Have you tried adding some DoEvents statements to your code to allow system events like a mouse movement to be handled?
 

mole999

Moderator
Joined
Oct 23, 2004
Messages
10,295
Office Version
2019, 2016, 2013
Platform
Windows
what excel version are you using, what spec of PC and the OS
 

Watch MrExcel Video

Forum statistics

Threads
1,095,728
Messages
5,446,174
Members
405,389
Latest member
Excel n00b2

This Week's Hot Topics

Top