Introduction | Example | Tutorial | Applications

Introduction - Application.ScreenUpdating = False

Prevent your screen from updating until your Excel macro is finished with Application.ScreenUpdating=False. The Application.ScreenUpdating property is useful when running macros that jump from cell to cell, sheet to sheet, and workbook to workbook.

Setting the Application.ScreenUpdating to False stops your screen from flickering (refreshing) as your macro runs. It can be used for other applications, but I find it most useful for Excel.

Example - Application.ScreenUpdating = False

Screen Updating Demonstration

Sub ScreenUpdatingDemo()
Application.ScreenUpdating = False
Range("a1").Select
For j = 1 To 10
    For i = 1 To 25
        Selection = i
        Selection.Offset(1, 0).Select
    Next i
    Selection.Offset(-25, 1).Select
Next j
Application.ScreenUpdating = True
End Sub

Make powerful macros with our free VBA Developer Kit

Tutorials like this can be complicated. That’s why we created our free VBA Developer Kit to supplement this tutorial. Grab it below and you’ll be writing macros so much faster than you are right now.

Sure, I'll take a free VBA Developer Kit

Tutorial - Application.ScreenUpdating = False

This demo uses Selection.Offset to forcefully change the selected cell in Excel. I recommend disabling ScreenUpdating anytime you are manually selecting cells or worksheets. Play around with the Application.ScreenUpdating property to prove it works.

Change False to True in Line 2 to see what happens when you don’t disable screen updating. Your screen will show each action your VBA code performs.

Displaying each step slows your macro down. It’s a good practice to disable screen updating to decrease total run time. Don’t forget to set your ScreenUpdating property back to True when you’re done.

Application Ideas - Application.ScreenUpdating = False

The silly code I presented in the ScreenUpdating Demonstration just numbers cells. Better uses for Application.ScreenUpdating=False are presented below:

  1. Adding new Worksheets
  2. Manipulating Word Documents from Excel
  3. Sending email from Excel
  4. Switching between Excel Sheets.
  5. Opening new Excel Workbooks.
  6. Switching between pages in Word.

That’s all for this tutorial. When you’re ready to take your VBA to the next level, subscribe using the form below.

Oh, and if you have a question, post it in our VBA Q&A community.


The best free VBA training on the web
I see people struggling with Excel every day and I want to help. That's why I'm giving away my 90-days to Master VBA eCourse and my entire personal macro library for free.

Let me join the wellsrPRO VBA Training program for free