Turning Off Screen Updating

A macro that makes changes to the appearance of a worksheet or chart — such as a macro that changes the color of every other cell in a large range or that creates a large number of graphic objects — will run faster when screen updating is turned off. You won't be able to watch the macro run (the changes will appear all at once when you turn screen updating back on), but it will run much faster. You may want to leave screen updating turned on while you write and debug the macro, and then turn it off.

To turn off screen updating, set the ScreenUpdating property to False, as shown in the following example.


Application.ScreenUpdating = False

Microsoft Excel automatically sets the ScreenUpdating property back to True when your macro ends.

Tip

You can sometimes achieve the same effect by not activating the object you're changing. For example, if you create graphic objects on a sheet without first activating the sheet, you don't need to turn screen updating off because the changes won't be visible.