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

rkaczano

Board Regular
Joined
Jul 24, 2013
Messages
141
Office Version
  1. 365
Platform
  1. Windows
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?
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
do you run any mouse enhancement software for gaming et al
 
Upvote 0
no but it is a work laptop and there could be security software running in the background.
 
Upvote 0
Have you tried adding some DoEvents statements to your code to allow system events like a mouse movement to be handled?
 
Upvote 0
No - I have not worked with those before. I will need to look into that.
 
Upvote 0
what excel version are you using, what spec of PC and the OS
 
Upvote 0

Forum statistics

Threads
1,214,560
Messages
6,120,217
Members
448,951
Latest member
jennlynn

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top