Application.ScreenUpdating = False

Mav

New Member
Joined
Mar 23, 2002
Messages
18
I have noticed that alot of people put this statement at the beginning of their macros:

Application.ScreenUpdating = False

and then at the end of the macro, it is usually turned backed to = True.

What exactly is the benifit of this?

Thanks.

Mav
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
HI Mav

The use of this is ideal for recorded macros as it prevents the screen flickering you often get. All is basically does is prevent the screen from 'repainting' and hence speeds up code.
 
Upvote 0
Hi,

Just to add to Dave's explanation, I believe these adding these two lines to the top of your porcedure

Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual

do more to speed up code than anything else. Of course there are other time savers, like never selecting anything unless necessary, avoid looping if you can, etc.

So, efficient code plus these two lines really gets your macro humming.

Make sure you change them back to

Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic

when the routine ends.

http://www.decisionmodels.com is a website that offers a bunch of secrets to speeding up code.

Bye,
Jay
 
Upvote 0

Forum statistics

Threads
1,213,497
Messages
6,113,999
Members
448,543
Latest member
MartinLarkin

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