To stop VBA from showing that a macro is running, turn off screen updating with Application.ScreenUpdating = False at the start of your macro and turn it back on with Application.ScreenUpdating = True before the macro ends. Also set Application.DisplayStatusBar = False to hide the status bar messages, and Application.EnableEvents = False if your code triggers other macros. This makes the macro run silently in the background without flickering or status updates. You will need the VBA editor open (Alt+F11) and a basic understanding of where to place these lines in your existing code.

What You'll Need

  • Excel (or another Office app) with macros enabled.
  • Access to the VBA editor: press Alt+F11 (Windows) or Fn+Alt+F11 (some Macs).
  • Your existing macro code, or a new module to test with.
  • Basic familiarity with VBA syntax (variables, If statements).

Step-by-Step

  1. Open the VBA editor. In Excel, press Alt+F11. If nothing happens, try Fn+Alt+F11. The editor opens in a separate window.
  2. Locate your macro. In the Project Explorer (left pane), find your workbook, expand it, and double-click the module containing your macro. If you don't see the Project Explorer, press Ctrl+R.
  3. Add screen updating control at the top. Immediately after the Sub line, insert:
    Application.ScreenUpdating = False
    This stops Excel from redrawing the screen while the macro runs, which is the main cause of visible flicker and the appearance that a macro is running.
  4. Add status bar control. On the next line, insert:
    Application.DisplayStatusBar = False
    This hides messages like "Ready" or custom status bar text that would otherwise appear during execution.
  5. Disable events (optional but recommended). If your macro changes cells or sheets that have event handlers (like Worksheet_Change), add:
    Application.EnableEvents = False
    This prevents those events from firing and showing dialogs or running other macros.
  6. Add error handling to restore settings. Before your main code, insert an On Error GoTo Cleanup line. At the end of your macro, before End Sub, add a Cleanup: label and restore the settings:
    Application.ScreenUpdating = True
    Application.DisplayStatusBar = True
    Application.EnableEvents = True
    This ensures the settings are restored even if an error occurs.
  7. Test the macro. Close the VBA editor, run your macro from Excel (Alt+F8, select, Run). The screen should not flicker, and the status bar should not show progress messages.
  8. Save your work. Save the workbook as a macro-enabled file (.xlsm) to keep the code.

Common Mistakes

  • Forgetting to turn ScreenUpdating back on. If an error occurs before the restore line, Excel may stay in a state where the screen doesn't update. Always use error handling to restore settings.
  • Placing the lines inside a loop. Setting ScreenUpdating = False repeatedly inside a loop is unnecessary and can slow things down. Set it once at the start.
  • Using DisplayStatusBar = False without restoring. The status bar may remain hidden after the macro ends, confusing users. Restore it in the Cleanup section.
  • Disabling events and not re-enabling. If you set EnableEvents = False and don't restore it, other macros that rely on events won't work until Excel is restarted.
  • Assuming this hides the macro from the Macro dialog. These settings only hide visual feedback during execution; the macro name still appears in the list.

Tips

  • Use a With block or a helper subroutine to set and restore application properties consistently across multiple macros.
  • For long-running macros, consider adding Application.Cursor = xlWait to show a busy cursor, but this is optional.
  • If you want to hide the application window entirely, set Application.Visible = False, but this can be risky—always restore it in error handling.
  • Test macros with ScreenUpdating = False on a copy of your workbook first, as some operations (like certain chart updates) may behave differently.
  • Remember that these settings affect the entire Excel application, not just the current workbook.

Troubleshooting

If the macro still shows flicker or status messages, check that you placed the lines at the very beginning of the Sub, before any other code. If the screen freezes or doesn't update after running, you likely forgot to restore ScreenUpdating = True—press Ctrl+Break to stop the macro, then manually run a small macro to set it back to True, or restart Excel. If events stop working, set EnableEvents = True in the Immediate Window (Ctrl+G) and press Enter. If the status bar remains hidden, run Application.DisplayStatusBar = True in the Immediate Window. For persistent issues, check for other macros or add-ins that might be overriding these settings.

Frequently Asked Questions

Does turning off ScreenUpdating hide the macro from the Macro dialog?

No. The Macro dialog (Alt+F8) still lists all available macros. ScreenUpdating only affects visual feedback during execution.

Can I hide the VBA editor window while the macro runs?

The VBA editor is separate; you can minimize it manually, but code cannot hide it from itself. Use Application.Visible = False to hide Excel, but that hides the whole application.

Why does my macro still flicker after setting ScreenUpdating = False?

Some operations, like selecting sheets or certain chart manipulations, may force a redraw. Also ensure you set it before any other code, and that no other macro or add-in resets it.

Is it safe to disable events?

Yes, as long as you re-enable them in error handling. Failing to do so can leave Excel in a state where event-driven macros don't run.

Does this work in other Office apps like Word or PowerPoint?

The same properties exist in Word and PowerPoint VBA, but the visual effect may differ. ScreenUpdating is most noticeable in Excel.

What if I don't have error handling and an error occurs?

Excel may remain with ScreenUpdating off, making it appear frozen. Press Ctrl+Break to stop the macro, then run a one-line macro to set Application.ScreenUpdating = True.