excel vba – screen updating

Speed up macros by turning the screen updating off

Running large macros can use a lot of resources in Excel, this can cause speed issues. A macro will execute every line of code and perform each task one at a time and as a result when you run the macro you will see the changes on screen which can slow things down on your machine. By turning off the screen updating, the macro will run the same way but you will not see what is happening. This can make a massive difference with large macros, by running in the background without the need to show on screen.

The line of code below should be put at the start of your macro after Sub and Variables, but before the first line of executable code.
Application.ScreenUpdating=FALSE

This is an Excel wide setting so you must remember to turn it on again before your Macro ends by adding (right above End Sub).
Application.ScreenUpdating=TRUE

Leave a Reply

Your email address will not be published. Required fields are marked *