VBA Screen Update

What is Excel VBA Screen Updating Property?

You must have noticed that when you run a macro in Excel VBA, you can see the changes on the screen as the code executes. It is due to the VBA Screen Updating property. The Screen Updating Property dictates whether the screen is updated in real-time while the code runs.

By default, Excel has screen updating enabled, which means that as the code executes, the screen continuously updates, causing flickering and a brief delay before displaying the output.

However, we can easily address this by adding a few lines of VBA code to disable the screen updating feature, i.e., using VBA Screen Updating False property. This simple adjustment ensures that the output is generated without any flickering, providing a smoother user experience. However, once the code is executed, it is not turned on automatically. For this, you should turn it ON from your end as shown below.

Key Takeaways
  • Excel VBA Screen Updating Property controls whether the screen is updated during the execution of VBA code.
  • Disabling Screen Updating (setting it to False) can significantly improve the speed and performance of VBA macros by eliminating unnecessary screen updates.
  • VBA Screen Updating Property should be used when executing time-consuming tasks to provide a smooth user experience without flickering or delays.
  • Remember to turn on Screen Updating (set it to True) once your VBA code has completed its execution to allow the screen to update again.

When to Use Screen Updating Feature?

VBA Screen Updating Property is beneficial when executing complex or lengthy VBA macros that involve multiple calculations, data manipulations, or UI updates. By turning off Screen Updating, unnecessary flickering and delays are eliminated, providing a seamless and efficient user experience. Therefore, it is recommended to disable VBA Screen Updating Property during the execution of time-consuming tasks and re-enable it once the macro has completed its execution.

Excel VBA – All in One Courses Bundle (35+ Hours of Video Tutorials)

If you want to learn Excel and VBA professionally, then ​Excel VBA All in One Courses Bundle​ (35+ hours) is the perfect solution. Whether you’re a beginner or an experienced user, this bundle covers it all – from Basic Excel to Advanced Excel, Macros, Power Query, and VBA.

How to Use Screen Updating Feature in VBA Code?

To utilize the VBA Screen Updating Code effectively in your VBA, follow these steps

  1. Declare the Application object at the beginning of your code module.

    Dim App As Application
    Set App = Application

    Note: You can directly access the properties and methods of the Application object without explicitly declaring it.

    As in Step 2, we have not explicitly declared the application object but are directly accessing the Screen Updating property using the code “Application.ScreenUpdating = False.”

  2. Disable Screen Updating.

    How to use Screen Updating Feature in Excel VBA - Step 2

  3. Perform your desired operations, such as calculations, data manipulations, or UI updates.

  4. Re-enable Screen Updating:

    How to use Screen Updating Feature in Excel VBA - Step 4

    Note: When screen updating is disabled (Application.ScreenUpdating = False), Excel does not visually update the screen as the code executes. It can provide a performance benefit by reducing flickering and improving the execution speed of your VBA code.

    However, any changes to the worksheet, such as updating cell values or formatting in VBA, are not immediately visible to the user.

    After completing the desired operations with screen updating disabled, it is vital to re-enable it (Application.ScreenUpdating = True) to allow Excel to update the screen and display the changes.

    By re-enabling screen updating, the user can see the updated values, formatting, or any other modifications made during the code execution.


To illustrate the usage of Screen Updating in VBA, let’s consider the following examples:

Example #1 – Turn Off Screen Updating

Let us enhance the initially mentioned example by utilizing the VBA Screen Updating Property to prevent screen flickering and ensure a smoother operation.

  • Step 1: Open the Visual Basic Editor by pressing ALT + F11.
VBA Screen Updating Property - Example 1 - Step 1
  • Step 2: Insert a new module by clicking “Insert” from the top menu and selecting “Module.”
Example 1 - Step 2
  • Step 3: In the new module, first, let’s create a subroutine “Sub DoubleCellValue()” and then disable screen updating by setting “Application.ScreenUpdating” to “False.” It prevents the screen from flickering during the code execution.
Example 1 - Step 3
  • Step 4: Now, let us clear the cells A1 to F100 contents. The contents of cells A1 to F100 are cleared using the “Range(“A1:F100″).ClearContents” statement. It ensures that the cells are empty before performing any calculations.
Example 1 - Step 4
  • Step 5: The starting values for cells A1 to F1 are set to 1, 2, 3, 4, 5, and 6 using the “Range(“A1:F1”).Value = Array(1, 2, 3, 4, 5, 6)” statement. It initializes the first row with these values.
Example 1 - Step 5
  • Step 6: A VBA loop is set up to iterate through cells A2 to F100 using the loop variable “i.”

The loop starts from row 2 (i = 2) and continues until row 100 (i <= 100).

  • Step 7: Within the loop, the code doubles the value of each cell based on the value in the previous cell.

For each cell A2 to F100, the value is calculated by multiplying the value in the previous row (i – 1) by 2 and assigning it to the current cell.

This is done using statements like “Range(“A” & i).Value = Range(“A” & i – 1).Value * 2”, where the value in cell A(i) is calculated based on the value in cell A(i-1), and so on for cells B to F.

 Example 1 - Step 7
  • Step 8: Once the loop completes, screen updating is re-enabled by setting “Application.ScreenUpdating” to “True.” It ensures that any subsequent changes made in the code are immediately visible to the user.
Example 1 - Step 8
  • Step 9: To execute the macro and turn off screen updating, save the workbook and close the Visual Basic Editor. Press ALT + F8 to open the “Macro” dialog box. Select the “DoubleCellValue” macro from the list and click “Run.”
Example 1 - Step 9
  • Step 10: This will run the code and create data in Cells A2 to F100. The code displays a message box with the text “Cell values updated!” using the MsgBox statement to notify the user that the cell values have been updated.
VBA Screen Updating Property - Example 1 - Step 10

You will notice that the values are updated in the cells (A2 to F100) smoothly without flickering or delay. This is achieved VBA Screen Updating Disable property, which prevents the screen from updating after each cell modification.

Here is the full code:

Sub DoubleCellValue()
‘ Disable Screen Updating
Application.ScreenUpdating = False
‘ Clear the contents of cells A1 to F100
‘ Initialize the starting values in cells A1 to F1
Range(“A1:F1”).Value = Array(1, 2, 3, 4, 5, 6)
‘ Loop through cells A2 to F100
Dim i As Long
For i = 2 To 100
‘ Double the previous cell value and put it in the current cell
Range(“A” & i).Value = Range(“A” & i – 1).Value * 2
Range(“B” & i).Value = Range(“B” & i – 1).Value * 2
Range(“C” & i).Value = Range(“C” & i – 1).Value * 2
Range(“D” & i).Value = Range(“D” & i – 1).Value * 2
Range(“E” & i).Value = Range(“E” & i – 1).Value * 2
Range(“F” & i).Value = Range(“F” & i – 1).Value * 2
Next i
‘ Re-enable Screen Updating
Application.ScreenUpdating = True
‘ Show Message
MsgBox “Cell values updated!”
End Sub

Example #2

In this example, we will learn how to create a smoother user experience while performing a simple calculation using VBA Screen updating property.

  • Step 1: In the new module, start by assigning a subroutine “Sub CalculateAndDisplayResult()” and Set “Application.ScreenUpdating” property to “False” to disable screen updating. It prevents any visual updates on the screen during the code execution.
Excel VBA Screen Updating Property - Example 2 - Step 1
  • Step 2: Now let us perform a simple calculation, such as adding two numbers; in this example, let us add 2 and 3 and store the result in a variable.
Example 2 - Step 2
  • Step 3: Assign the calculated result to a specific cell on the worksheet using the “Range(“A1”).Value” notation.
Example 2 - Step 3
  • Step 4: Return the “Application.ScreenUpdating” property to “True” to re-enable screen updating. It allows the changes to the worksheet, including the calculated result, to be displayed on the screen.
Example 2 - Step 4
  • Step 5: Now, let us show a message box to inform the user that the calculation process has been completed. It provides a visual indication that the code execution has finished. The message box will appear with the text “Calculation completed!” when this step is reached in the code.
Excel VBA Screen Updating Property - Example 2 - Step 5
  • Step 6: To execute the macro, save the workbook and close the Visual Basic Editor. Press ALT + F8 to open the “Macro” dialog box. Select the “CalculateAndDisplayResult” macro from the list and click “Run”.
Example 2 - Step 6
  • Step 7: Once you run the macro, you will observe that the calculated result is instantly displayed in cell A1 with a message displayed in the message box.
Excel VBA Screen Updating Property - Example 2 - Step 7

Here is the full code:

Sub CalculateAndDisplayResult()
‘ Disable Screen Updating
Application.ScreenUpdating = False
‘ Perform a calculation
Dim result As Double
result = 2 + 3
‘ Show the result on the worksheet
Range(“A1”).Value = result
‘ Enable Screen Updating
Application.ScreenUpdating = True
‘ Show a message to indicate completion
MsgBox “Calculation completed!”
End Sub

Important Things to Note

  • While Screen Updating is disabled, any changes made to the workbook will not be visible until Screen Updating is re-enabled.
  • Be cautious when disabling VBA Screen Updating Property if your code relies on user interaction, as the user may not see any feedback until it is re-enabled.
  • It’s important to place the VBA Screen Updating Code at the right locations in your VBA code. Typically, you would disable VBA Screen Updating Property at the beginning and re-enable it at the end to ensure the entire code runs without unnecessary screen updates.

Frequently Asked Questions (FAQs)

1. How to turn off screen updating in Excel VBA?

To turn off VBA Screen Updating Property in Excel VBA, you can set the “ScreenUpdating” property of the Application object to False.

Application.ScreenUpdating = False

2. Why is Excel VBA screen updating not working?

If the Screen Updating feature does not seem to work in your Excel VBA code, the reasons could be:

Ensure that you have correctly set the “ScreenUpdating” property to False before the code execution begins and set it back to “True” after completing the necessary tasks.

Check if your VBA code triggers events that may override the Screen Updating property. For example, certain events, such as “Worksheet_Change” can cause the screen to update regardless of the “ScreenUpdating” setting.

Lastly, verify if your code is running in a trusted environment. Some security settings or add-ins may restrict the ScreenUpdating property, preventing it from being disabled or modified.

3. What does Application ScreenUpdating False mean in Excel VBA?

Setting “Application.ScreenUpdating = False” in Excel VBA disables the screen updating feature. When Screen Updating is set to “False”, the changes made by your VBA code are not immediately displayed on the screen. This improves the execution speed of your macros.

4. What is the default Application.ScreenUpdating in Excel VBA?

The default value of the “Application.ScreenUpdating” property in Excel VBA is True. It means that by default, Excel VBA updates the screen to display any changes made by your code during its execution. It is important to be aware of this default behavior and decide when to turn off Screen Updating based on the specific requirements of your VBA macros.

Download Template

This article must help understand VBA Screen Updating Property with its formula and examples. You can download the template here to use it instantly.

This has been a guide to VBA Screen Updating Property. Here we learn how to use screen updating feature in VBA code, examples & downloadable excel template. You can learn more from the following articles –

Reader Interactions

Leave a Reply

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