{"id":9490,"date":"2022-04-29T11:52:01","date_gmt":"2022-04-29T11:52:01","guid":{"rendered":"https:\/\/officetuts.net\/excel\/?p=9490"},"modified":"2024-02-19T15:00:25","modified_gmt":"2024-02-19T15:00:25","slug":"turn-screen-updating-on-and-off-in-vba","status":"publish","type":"post","link":"https:\/\/officetuts.net\/excel\/vba\/turn-screen-updating-on-and-off-in-vba\/","title":{"rendered":"How to Turn Screen Updating On and Off in VBA"},"content":{"rendered":"\n
If you ever worked with VBA, you could probably be in a situation where your code is not as fast as you would want it to be. There are a couple of things that you can do to speed it up a little bit.<\/p>\n\n\n\n
In the example below, we will show how to speed up the code by turning the screen updating off in VBA.<\/strong><\/p>\n\n\n\n Screen updating can be turned on or off through the VBA module. In simple terms, it has to be done at the application level. We are going to use the following sentence:<\/p>\n\n\n\n We will show its importance in one example. To do this, we need to open the Excel file, click on ALT + F11,<\/strong> and then right-click on the left window that appears, go to Insert >> Module:<\/strong><\/p>\n\n\n\nTurn Screen Updating On and Off<\/h2>\n\n\n\n
Application.ScreenUpdating = False (turning it off)\nApplication.ScreenUpdating = True (turning it on)<\/code><\/pre>\n\n\n\n