Fix Green Lines When Resizing Excel VBA Dialog Boxes
Question details
The user is experiencing visual artifacts in the form of green lines when resizing a VBA dialog box or UserForm in Excel.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Resizing a custom VBA dialog box (UserForm) during active Excel usage.
- Observed behavior
- Green lines appear on the screen while the dialog box is being resized, suggesting a rendering glitch, a macro conflict, or an add-in interference.
Ensure your computer's graphics drivers are up to date and verify if the issue persists in a completely blank workbook to isolate whether the problem is specific to your current file's VBA code.
Diagnose Excel Add-ins and Rendering Settings
Check if a conflicting Office add-in or Excel's hardware acceleration is causing the visual artifacts during dialog box resizing.
Rendering issues like green lines are often caused by conflicts between Excel's hardware graphics acceleration and certain third-party COM add-ins. Disabling them temporarily can help identify the root cause.
Open Excel and navigate to File > Options > Advanced. Scroll down to the Display section and check the box for 'Disable hardware graphics acceleration', then restart Excel.
Go to File > Options > Add-ins. At the bottom of the window, select 'COM Add-ins' from the Manage dropdown menu and click 'Go'.
Uncheck all active add-ins in the list and click OK. Resize your VBA dialog box again to see if the green lines have disappeared.

Seek Expert Help on Stack Overflow
Because this issue may stem from deep VBA rendering or specific custom macro code, posting the problem to a developer community is highly recommended.
Switch to WPS Office for a Smoother Spreadsheet Experience
If rendering glitches and VBA issues in Microsoft Excel continue to disrupt your workflow, consider switching to WPS Office. It provides a lightweight, highly compatible, and completely free alternative with robust support for complex spreadsheets.
- 1. Download the Installer: Visit the official WPS Office website and download the free version for your operating system.
- 2. Install WPS Office: Run the downloaded executable file and follow the straightforward on-screen instructions to complete the installation.
- 3. Open Your Macro File: Launch WPS Spreadsheet and open your existing .xlsm file to continue working with your macros smoothly.

Frequently Asked Questions
Why do green lines appear when I resize my Excel UserForm?
Visual artifacts like green lines typically indicate a UI rendering glitch. This can be caused by hardware graphics acceleration issues, an incompatible Office add-in, or inefficient repainting code within your VBA UserForm's resize event.
How can I stop screen flickering when my VBA macro runs?
To prevent screen flickering and artifacting during macro execution, add the line 'Application.ScreenUpdating = False' at the beginning of your macro, and set it back to 'True' right before the macro finishes.
What details should I provide when asking for VBA help on Stack Overflow?
Always include your exact Excel version, operating system, any active third-party add-ins, the specific VBA code block involved, screenshots of the problem (like the green lines), and precise step-by-step instructions on how to reproduce the issue.




