Userform finished updating, but it still consumes 20% CPU and hangs excel.

RockandGrohl

Well-known Member
Joined
Aug 1, 2018
Messages
671
Office Version
  1. 2010
Platform
  1. Windows
Hi all,

I have a sheet that has a large userform with many controls & updating text boxes on it. There's 4 criteria boxes with 7 rows of labels, checkboxes & text boxes on them. When a button is pressed, a large database is filtered down using Advanced filter to produce a list of clients that match the criteria entered on any one (or combination) of the 4 criteria boxes.


The trouble is that for some reason, when I add multiple lines of criteria the database is filtered correctly, the determined information is calculated properly but the Userform takes a lot longer to re-appear on screen and is updated piece-by-piece. Then, once the userform is fully back on screen, it is frozen and I can't close it or click on any text boxes etc. It also freezes Excel and I need to close it from Task Manager.

In Task Manager, I can it is consuming 22% of CPU usage continually, and it never stops unfreezing.


This sheet is a duplicate of another sheet that runs in an almost identical way, except that sheet has twice as many rows in the database file. So I can't understand why the original file runs superbly yet the new one freezes when the Userform is re-displayed.

Can anyone help please?
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

6StringJazzer

Well-known Member
Joined
Jan 27, 2010
Messages
865
Office Version
  1. 365
Platform
  1. Windows
You are going to need to provide all your VBA code to be able to even start to diagnose this. Please show the code for the button click, along with any Subs and Functions it calls. Use code tags.

Also, it is possible that the issue is not in the code itself but in the database structure or data itself, so even better if you could find a way to share the whole file.
 

Forum statistics

Threads
1,143,677
Messages
5,720,252
Members
422,272
Latest member
ginkgoVil

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
Top