Sometimes the table is very slow, until i minimize excel

jqfranco

New Member
Joined
Dec 27, 2017
Messages
28
Good Morning .
I searched a lot for a problem similar to mine and couldn't find it.

I have an excel sheet with several tables, where I make some Loops through all its lines looking for information.
During the Loop, I open a form window with a bar that shows the progression in the table.
On many occasions the progression is fast, but sometimes it gets so slow that it takes 5 seconds or more on each row of the table, which makes everything extremely slow.
But...if I minimize excel, I see that the progression in the form window becomes fast again.
I re-maximize Excel and everything is normal.
Is there any reason why this happens?
If the code was wrong and slow, it would always be slow, right?

Thank you for your help.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Good Morning .
I searched a lot for a problem similar to mine and couldn't find it.

I have an excel sheet with several tables, where I make some Loops through all its lines looking for information.
During the Loop, I open a form window with a bar that shows the progression in the table.
On many occasions the progression is fast, but sometimes it gets so slow that it takes 5 seconds or more on each row of the table, which makes everything extremely slow.
But...if I minimize excel, I see that the progression in the form window becomes fast again.
I re-maximize Excel and everything is normal.
Is there any reason why this happens?
If the code was wrong and slow, it would always be slow, right?

Thank you for your help.
I think that can be resolved by stopping screen updating during the process and allowing Screen Update after the process. This helps excel to do the process in background and thus makes most calculation and output faster.

VBA Code:
Application.ScreenUpdating = True

True to update (after loop), False to Stop update (before loop)
 
Upvote 0

Forum statistics

Threads
1,224,889
Messages
6,181,607
Members
453,055
Latest member
cope7895

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