Fix Excel 2021 Crashing When Hovering Over VBA Breakpoints
Question details
The user needs to prevent Excel from crashing or throwing errors when hovering the mouse over a qualified field inside a VBA With block while stopped at a breakpoint.
- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Debugging VBA code using breakpoints near a With...End With block.
- Observed behavior
- Excel 2016 (32-bit) throws an error, and Excel 2021 crashes completely when the user hovers over a qualified field inside the block while the breakpoint is located outside of it.
Ensure your VBA project is fully compiled by selecting 'Debug' > 'Compile VBAProject' to catch underlying syntax or scope errors before executing the code.
Use Alternative Debugging Windows Instead of Hovering
Avoid the crash by using the Immediate Window or Watch Window to safely inspect variable values without triggering the mouse-hover evaluation bug.
Excel's VBA engine can struggle to evaluate object properties when they are out of scope. When a breakpoint is outside a With block, hovering over a field inside the block forces the engine to evaluate an incomplete reference, which leads to memory access violations and application crashes.
Press ALT + F11 on your keyboard to open the Visual Basic for Applications (VBA) editor in Excel.
Navigate to the top menu, click 'View', and select 'Immediate Window', or simply press CTRL + G.
Instead of hovering your mouse over the field, type '? YourVariableName' in the Immediate Window and press Enter to safely evaluate its current value.
Alternatively, right-click the variable or field you want to monitor and select 'Add Watch'. This allows you to track its value in the Watch Window securely while stepping through breakpoints.
Seek Advanced Help on Developer Communities
Since this specific VBA evaluation crash is outside standard Microsoft Support scope, consulting specialized developer forums can help you find code-level workarounds.
Try WPS Office for a Stable and Lightweight Spreadsheet Experience
If you are tired of unexpected crashes and complex troubleshooting in Microsoft Office, consider switching to WPS Office. It provides a highly compatible, lightweight, and user-friendly environment for managing your spreadsheets and daily tasks safely.
- 1. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
- 2. Install the software: Run the installer and follow the simple on-screen instructions to set up WPS Office on your device.
- 3. Open your files: Launch WPS Spreadsheets and open your existing Excel workbooks directly without losing any formatting or data.

Frequently Asked Questions
Why does Excel crash when debugging a With...End With block in VBA?
When execution pauses at a breakpoint outside the block, the objects inside the With statement are considered out of scope. Hovering over a field inside the block forces the VBA engine to evaluate an incomplete reference, triggering memory access violations that crash Excel.
Is there an official patch for this Excel 2021 VBA crash?
Currently, Microsoft considers many VBA edge-case debugging issues as outside standard support scopes. Rather than waiting for a software patch, it is highly recommended to adjust your debugging habits by using the Immediate or Watch windows.
Does this issue affect 64-bit versions of Excel as well?
While it is heavily documented in Excel 2016 (32-bit) and Excel 2021, out-of-scope evaluations can cause instability or silent errors across multiple versions and bitnesses. Utilizing standard debugging windows prevents the issue regardless of your Excel architecture.




