logo
search
VBA & Macro Problems

Fix Excel Screen Flickering When Application.EnableEvents Is True

Nimra MalikNimra Malik Oct 19, 2026 868 views

Question details

The user is experiencing continuous screen flickering while running an Excel VBA macro to copy and paste data across columns.

How to Fix Excel Screen Flickering When Application.EnableEvents Is True
Product
Excel
Device & OS
not provided
Scenario
Running a VBA macro that involves copying and pasting several columns across worksheets while Application.EnableEvents is set to True.
Observed behavior
The screen flickers continuously during the macro's execution because underlying event procedures are being triggered repeatedly by the copy-and-paste operation.
Before you start

Before modifying your VBA code, press CTRL + S to save your workbook, as interrupting macros with disabled events might temporarily leave your spreadsheet unresponsive to normal interactions.

Solution 1Recommended

Temporarily Disable Events and Screen Updating in Your Macro

Turn off both application events and screen updating during the copy-paste operation to prevent background macros from triggering and causing flickers.

When Application.EnableEvents is True, pasting data can trigger events like Worksheet_Change. If these background events run repeatedly or toggle screen settings, the display will flicker. You can wrap your main copy-paste logic in a block that disables these features temporarily.

It is crucial to include an error handler so that if your macro fails mid-execution, Excel will still restore the event and screen updating settings to True.

1
Open the VBA Editor

Press ALT + F11 on your keyboard to open the Visual Basic for Applications (VBA) Editor, and locate your macro module.

2
Add Error Handling

At the beginning of your subroutine, type 'On Error GoTo CleanUp' to ensure the code jumps to a safe restoration block if an error occurs.

3
Disable Events and Updating

Add 'Application.EnableEvents = False' and 'Application.ScreenUpdating = False' right before your copy-and-paste logic begins.

4
Restore Application Settings

At the end of your code, create a 'CleanUp:' label and add 'Application.ScreenUpdating = True' followed by 'Application.EnableEvents = True' to restore normal behavior.

Temporarily Disable Events and Screen Updating in Your Macro
Best Practice: Always pairing an 'EnableEvents = False' with a 'True' inside an error handler prevents your Excel application from getting stuck in a non-responsive state where regular events refuse to fire.
Advanced Macro Support in WPS Office

Run and Edit VBA Macros Seamlessly in WPS Spreadsheet

WPS Office provides robust built-in support for VBA and macros, allowing you to seamlessly run, edit, and optimize your Excel scripts without screen flickering issues or heavy performance drops.

  1. 1. Open Your Workbook: Launch WPS Spreadsheet and open your macro-enabled workbook (.xlsm).
  2. 2. Access Developer Tools: Navigate to the 'Developer' tab on the top ribbon. If it is hidden, you can enable it in the WPS Options menu.
  3. 3. Open the VBA Editor: Click 'Visual Basic' or 'Macros' to access your VBA scripts within the built-in editor.
  4. 4. Optimize Code: Implement the ScreenUpdating and EnableEvents optimizations directly in your macro to prevent screen flickering during execution.
Fully compatible with Microsoft Excel VBA syntax and objectsLightweight application structure ensures smoother and faster macro executionComprehensive developer tools and VBA Editor available out of the boxFree and intuitive interface for a seamless transition from Microsoft Office
microsoft office alternative - wps office

Frequently Asked Questions

Why does Application.EnableEvents = True cause my screen to flicker?

The setting itself doesn't cause flickering. When set to True, it allows background event triggers (like Worksheet_Change) to fire during tasks like pasting. If these event macros contain commands that refresh the screen or toggle ScreenUpdating rapidly, it results in a noticeable flickering effect.

What happens if my macro crashes while Application.EnableEvents is False?

Excel will stop responding to events entirely. Actions like clicking cells, changing data, or switching sheets won't trigger their expected macros. You can fix this manually by typing 'Application.EnableEvents = True' in the Immediate Window (CTRL + G) of the VBA Editor and pressing Enter.

Does turning off Application.ScreenUpdating speed up my macro?

Yes. By setting Application.ScreenUpdating = False at the beginning of your script, Excel stops redrawing the visual interface after each background operation. This not only eliminates screen flickering but also significantly reduces the macro's total execution time.