⚙️ Does Turning Off Screen Updating Really Make VBA Macros Run Faster?

⚙️ Does Turning Off Screen Updating Really Make VBA Macros Run Faster?

You run a VBA macro that formats a large report, cleans imported data, or updates hundreds of formulas. Excel begins to flicker: cells change color, filters move, worksheets activate, and the screen seems to replay every step of the code.

The familiar advice is to put Application.ScreenUpdating = False near the top of the macro. It is one of the first performance “fixes” many VBA users learn—and one of the most misunderstood.

Turning it off can make a macro feel dramatically quicker. In some tasks, it also reduces real run time. In others, the improvement is modest because Excel is busy doing something much more expensive than drawing the worksheet.

The useful question is not whether screen updating is good or bad. It is what work your macro is actually making Excel do, and whether redrawing the user interface is a meaningful part of that work.

🖥️ What ScreenUpdating Actually Controls

Application.ScreenUpdating is an Excel application setting. When it is True, Excel normally refreshes its visible interface as VBA changes cells, sheets, selections, windows, charts, and other display-related elements.

When set to False, Excel suppresses many of those visible redraws until updating is turned back on. Your code still runs; the worksheet still changes; formulas may still calculate. Excel simply avoids showing every intermediate visual state.

Think of it as asking Excel not to repaint the room each time you move one piece of furniture. The furniture still moves. The request mainly affects when the observer sees it.

⚡ Why It Can Make a Macro Faster

Redrawing a workbook is work. Excel may need to paint cell contents, formatting, gridlines, conditional formats, charts, sheet tabs, and the current selection. Repeating that work during a loop can consume noticeable time.

If a macro makes many visible changes, suppressing intermediate redraws reduces the amount of user-interface work Excel performs. It also prevents the distracting flicker that makes a workbook appear unresponsive or chaotic.

The benefit is most likely when code repeatedly changes the active sheet, selects ranges, formats cells one at a time, or updates visible objects. Those actions create opportunities for Excel to redraw.

🧠 The Crucial Distinction: Display Work Versus Workbook Work

A worksheet update has more than one possible cost. Excel might need to change a cell value, recalculate dependent formulas, update a table, refresh a chart, write to disk, and redraw the screen.

ScreenUpdating = False targets only the display portion. It does not make string manipulation inherently faster, reduce the number of loop iterations, simplify formulas, or speed up a slow database query.

This distinction explains conflicting advice. Two users can apply the same setting and see very different results because their macros spend time in different places.

🔄 What Excel Still Does While the Screen Is Frozen

Turning off screen updating is not a pause button for Excel. VBA statements continue to execute, ranges continue to receive values, and workbook objects continue to change.

Excel may also still calculate formulas, run event procedures, update named ranges, maintain tables, and process other workbook logic. Whether each activity occurs immediately depends on other application settings and on the specific action.

Do not assume that a still-looking worksheet means Excel is idle. A macro can be working intensely while the display remains unchanged.

📊 A Simple Example of a Likely Benefit

Imagine a macro that formats 10,000 individual cells. It applies a fill color, a number format, and a border to each cell in a loop. If the active worksheet is visible, Excel may repeatedly update the display as those changes occur.

In that hypothetical case, disabling screen updating can reduce needless visual work. But the loop itself is still inefficient because it makes tens of thousands of separate object-model calls.

Application.ScreenUpdating = False

Dim cell As Range
For Each cell In Range("A2:A10001")
    cell.NumberFormat = "0.00"
Next cell

Application.ScreenUpdating = True

The setting helps, but applying the format to the complete range in one operation is usually the larger improvement.

📦 Why Bulk Range Operations Matter More

Communication between VBA and the Excel object model has overhead. Each instruction such as cell.Value = ... or cell.Interior.Color = ... is a request to Excel.

When practical, read a range into a VBA array, process the array in memory, and write it back once. Likewise, format an entire range rather than formatting its cells individually.

Application.ScreenUpdating = False
Range("A2:A10001").NumberFormat = "0.00"
Application.ScreenUpdating = True

Removing thousands of separate operations usually matters more than hiding thousands of redraws. The fastest optimization is often reducing work rather than concealing it.

🧮 Calculation Is a Separate Performance Lever

Formula-heavy workbooks may recalculate after changes to cells. If many formulas depend on the cells your macro edits, recalculation can dominate the running time.

For carefully controlled procedures, developers sometimes temporarily use manual calculation:

Application.Calculation = xlCalculationManual
' Make many changes
Application.Calculation = xlCalculationAutomatic

This is different from screen updating. Manual calculation postpones much of the formula calculation work; screen updating postpones visual refreshes. They are often used together, but they solve different problems.

⚠️ The Risk of Leaving Calculation Manual

Manual calculation can be useful, but it carries a bigger correctness risk than hiding screen updates. If an error occurs before automatic calculation is restored, users may see stale formula results without realizing it.

A workbook can also have calculation modes and dependencies that require care. A macro that relies on formulas being current should explicitly calculate the required workbook or worksheet at the appropriate point.

Never add manual calculation merely because it appears in a generic “speed up VBA” template. First identify whether calculation is actually the bottleneck.

🔔 Events Can Quietly Add More Work

Excel events are procedures that run in response to actions such as changing a cell, activating a worksheet, or recalculating. For example, a Worksheet_Change procedure can execute whenever VBA writes values to a watched range.

If a macro changes many cells, event code may run repeatedly and add substantial work. Disabling events temporarily can be appropriate when the macro itself handles the necessary logic.

Application.EnableEvents = False
' Perform controlled changes
Application.EnableEvents = True

This setting is not a screen-refresh setting. It prevents event procedures from running, so use it only when skipping those procedures is safe.

🪟 Why Selecting and Activating Objects Causes Trouble

Recorded macros frequently contain Select, Selection, and Activate. These instructions mimic a person using Excel, but most VBA code does not need to do that.

Selecting a range changes the visible focus. Activating a worksheet changes the view. With screen updating enabled, those movements are obvious; with it disabled, they are hidden, but they can still add internal work and make code fragile.

Direct references are clearer and more reliable:

' Less direct
Worksheets("Report").Activate
Range("B2").Select
Selection.Value = "Complete"

' Direct
Worksheets("Report").Range("B2").Value = "Complete"

🎨 Formatting Macros Often Show the Biggest Visible Difference

Formatting changes are inherently visual. Applying fonts, borders, fills, row heights, column widths, conditional formats, and chart styles can prompt noticeable redraw activity.

That makes formatting macros good candidates for ScreenUpdating = False, especially when changes occur across several worksheets. Users also benefit because they do not have to watch a report assemble itself in fragments.

Still, use efficient formatting methods first: apply a style to a range, copy formats in blocks where appropriate, and avoid repeatedly changing the same properties.

📈 Data Processing May Benefit Less

Consider a macro that reads a CSV file, splits text, validates records in a VBA array, and writes a finished result to a worksheet once. Most of its time may be spent reading data and processing strings, not painting the Excel window.

Turning off screen updating remains a reasonable housekeeping step if the macro changes sheets or ranges. But it may not materially change the elapsed time.

This is why a macro can look smoother without becoming much faster. A better user experience is still valuable, but it is not the same as a major performance gain.

📉 External Data and Refreshes Follow Their Own Rules

Refreshing queries, connections, pivot caches, or external data can take time because Excel may be waiting for another system, retrieving data, or transforming results. Screen updating does not shorten that outside work.

It can prevent distracting visual changes while the results arrive, but it cannot make a slow server respond faster. Diagnose refresh performance separately from worksheet-display performance.

Similarly, saving a large workbook is affected by workbook size, formulas, objects, file format, storage location, and other factors that screen updating does not directly address.

🧪 Measure Instead of Guessing

Performance tuning is most useful when it is measured. VBA provides the Timer function, which can be used to compare the same task under controlled conditions.

Dim startTime As Double
startTime = Timer

' Code to test

Debug.Print "Seconds: "; Timer - startTime

Run a representative task more than once because workbook state, cached data, background activity, and first-run setup can affect a result. Compare one change at a time rather than changing five settings and guessing which one helped.

⏱️ Time the Right Part of the Macro

A single total duration is useful, but section-level timing is better for diagnosis. Time data import, data transformation, worksheet writing, formatting, and calculation separately.

If writing an array to a range takes little time but formatting takes much longer, focus on formatting. If the delay occurs after values are written, calculation or events may be responsible.

Profiling does not need to be elaborate. A few well-placed timing messages can prevent hours of optimizing the wrong part.

🧾 A Practical Before-and-After Test

Use a copy of a realistic workbook. Run the macro with normal settings, then run it with only screen updating disabled. Keep the data volume, workbook state, and macro path as similar as possible.

Test condition What it helps reveal
Normal display Baseline elapsed time and visible behavior
Screen updating off Cost of repeated redraws
Calculation changed separately Whether formulas are a major cost
Events changed separately Whether event procedures add work
Bulk range rewrite Cost of cell-by-cell object calls

The point is not to create a laboratory-perfect benchmark. It is to make decisions based on the actual workbook your users run.

🧹 A Safe Basic Pattern

At minimum, turn screen updating off before the visually busy work and restore it afterward:

Sub BuildReport()
    Application.ScreenUpdating = False

    ' Build or format the report here

    Application.ScreenUpdating = True
End Sub

This is easy to read, but it has a weakness: if an error interrupts the procedure, the final line may never execute. Excel can then remain visually frozen for the user.

🛡️ Restore Settings Even When Something Fails

Production macros should use error handling to restore application-level settings. The cleanup block should run whether the main work succeeds or fails.

Sub BuildReport()
    Dim oldScreenUpdating As Boolean
    oldScreenUpdating = Application.ScreenUpdating

    On Error GoTo CleanUp
    Application.ScreenUpdating = False

    ' Build or format the report here

CleanUp:
    Application.ScreenUpdating = oldScreenUpdating

    If Err.Number <> 0 Then
        MsgBox "The macro stopped: " & Err.Description
    End If
End Sub

Saving the original value is more considerate than always setting it to True. Another procedure or user setting may have already changed it.

🧰 Restore Every Setting You Change

If your macro changes calculation, events, alerts, status bar text, or other application properties, capture and restore each relevant value. Treat these settings as borrowed shared resources.

A robust cleanup section might restore ScreenUpdating, EnableEvents, Calculation, and DisplayAlerts. Do not restore properties you did not change merely out of habit.

This discipline prevents confusing after-effects, such as formulas no longer updating or prompts silently disappearing after a macro has failed.

🚨 Do Not Use ScreenUpdating to Hide Bad Design

A flickering macro may be revealing deeper problems: repeated selections, unnecessary worksheet activation, cell-by-cell loops, or redundant formatting. Turning off redraws makes those symptoms less visible, but does not remove their cost.

It is reasonable to use the setting for a cleaner experience. It is not a substitute for improving the algorithm and reducing object-model traffic.

A useful order of operations is: eliminate unnecessary work, process data in batches, then suppress incidental interface work.

🧩 The Cost of Cell-by-Cell Loops

Loops are not inherently wrong. They are often necessary for decisions that vary by row or for processing values held in an array. The issue is repeatedly reading from and writing to worksheet cells inside the loop.

For example, a loop that reads one cell, writes another cell, formats a third cell, and repeats thousands of times crosses between VBA and Excel constantly. A loop over an in-memory array avoids much of that back-and-forth.

Screen updating can soften the visible effect, but arrays and bulk writes often address the underlying performance pattern.

📐 Use Qualified Object References

Code such as Range("A1") depends on the active worksheet. That can force you to activate sheets or can accidentally modify the wrong sheet when workbook context changes.

Use a worksheet variable or a fully qualified reference instead:

Dim ws As Worksheet
Set ws = ThisWorkbook.Worksheets("Report")
ws.Range("A1:D100").ClearContents

This style reduces dependence on the interface, makes the code easier to follow, and complements screen updating being off because the macro does not need to navigate visibly through the workbook.

📢 Status Updates Need a Different Choice

Long-running macros can leave users wondering whether Excel has stopped responding. Screen updating off removes visual progress, which may increase that uncertainty.

For a genuinely long task, use a brief status-bar message or a purposeful progress indicator. Update it occasionally—not on every loop iteration, since frequent status changes can create their own overhead.

Application.StatusBar = "Processing records..."
' Work
Application.StatusBar = False

Good automation is not only fast; it also gives users appropriate feedback.

🧭 ScreenUpdating Is an Application-Wide Setting

Application.ScreenUpdating belongs to the Excel application, not to one worksheet or one workbook. Its effect can be visible across the Excel session while your macro is running.

That is another reason to keep the disabled period focused and to restore the original value reliably. Avoid leaving an application-wide setting altered while waiting for user input or showing a long sequence of message boxes.

When multiple workbooks or add-ins are involved, careful cleanup becomes especially important.

🔍 Debugging Changes When the Screen Does Not Refresh

During development, visible changes can help you understand what the code is doing. A frozen display can make it harder to spot an unexpected selection, an incorrect range address, or a step that is taking too long.

Leave screen updating on while you are learning or debugging a procedure, then switch it off for the stable production path. You can also temporarily enable it around a diagnostic step when necessary.

Performance settings should not make code impossible to inspect.

🧱 Cases Where You Should Leave It On

There are valid reasons not to suppress updating. A macro intended as a demonstration may need to show each action. A guided user process may depend on the active cell or visible worksheet changing at specific moments.

Likewise, a short macro that makes one or two changes gains little from extra state-management code. Simplicity is often preferable when the display cost is negligible.

The setting is a tool, not a mandatory opening line for every procedure.

🧷 The Temptation of DoEvents

Developers sometimes add DoEvents to make Excel feel responsive during a long macro. It yields execution briefly so Excel and Windows can process pending messages.

It does not solve the same problem as screen updating, and it can allow user interaction or other events at inconvenient times. Used carelessly, it can make state-dependent code harder to reason about.

Use it only with a clear purpose, controlled conditions, and appropriate safeguards—not as a universal speed technique.

🏎️ A Sensible Performance Checklist

When a macro is slow, start with the source of the work rather than a collection of copied settings.

  • Measure which stage consumes time.
  • Remove Select, Activate, and unnecessary sheet navigation.
  • Read and write ranges in blocks where possible.
  • Use arrays for substantial data transformations.
  • Review formulas, calculation timing, and volatile functions when calculation is slow.
  • Check whether event procedures run during bulk changes.
  • Disable screen updating during visually intensive, noninteractive work.
  • Restore every altered application setting, even after an error.

This sequence keeps optimization connected to a clear cause rather than folklore.

✅ A Reusable, Careful Template

The following pattern shows how several settings can be managed together. Adapt it only to settings your procedure truly needs to change.

Sub UpdateWorkbook()
    Dim oldScreenUpdating As Boolean
    Dim oldEnableEvents As Boolean
    Dim oldCalculation As XlCalculation

    oldScreenUpdating = Application.ScreenUpdating
    oldEnableEvents = Application.EnableEvents
    oldCalculation = Application.Calculation

    On Error GoTo CleanUp

    Application.ScreenUpdating = False
    Application.EnableEvents = False
    Application.Calculation = xlCalculationManual

    ' Efficient workbook operations go here

CleanUp:
    Application.Calculation = oldCalculation
    Application.EnableEvents = oldEnableEvents
    Application.ScreenUpdating = oldScreenUpdating

    If Err.Number <> 0 Then
        MsgBox Err.Description
    End If
End Sub

If the macro requires current formulas before it finishes, calculate deliberately at the right point rather than assuming restoration alone gives the user the result they expect.

🎯 The Real Answer: Faster, But Not by Magic

Turning off screen updating really can make VBA macros run faster when repeated display refreshes are part of the workload. It is particularly useful for macros that make many visible worksheet, formatting, selection, or navigation changes.

Its effect is limited when the true delay comes from calculation, external data retrieval, disk operations, inefficient algorithms, or excessive cell-by-cell interaction. In those cases, it may make the macro look calmer without changing the main bottleneck.

The core principle is straightforward: use ScreenUpdating to reduce unnecessary interface work, then improve the code that does the necessary work.

Screen updating is a valuable finishing tool for efficient VBA, not a substitute for efficient VBA. Measure your macro, target its real bottleneck, and always leave Excel in a clean, usable state. ⚙️📊✅