logo
search
Office Apps Crashing

Fix Excel 2021 Crashing When Hovering Over VBA Breakpoints

Maira MehtabMaira Mehtab Sep 28, 2026 869 views

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.
Before you start

Ensure your VBA project is fully compiled by selecting 'Debug' > 'Compile VBAProject' to catch underlying syntax or scope errors before executing the code.

Solution 1Recommended

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.

1
Open the VBA Editor

Press ALT + F11 on your keyboard to open the Visual Basic for Applications (VBA) editor in Excel.

2
Enable the Immediate Window

Navigate to the top menu, click 'View', and select 'Immediate Window', or simply press CTRL + G.

3
Query the variable manually

Instead of hovering your mouse over the field, type '? YourVariableName' in the Immediate Window and press Enter to safely evaluate its current value.

4
Add a Watch for continuous monitoring

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.

Safe Debugging Practice: Relying on the Watch and Immediate windows is generally more stable than tooltip evaluations, especially when dealing with complex object hierarchies or out-of-scope With blocks.
Free Microsoft Office alternative

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. 1. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
  2. 2. Install the software: Run the installer and follow the simple on-screen instructions to set up WPS Office on your device.
  3. 3. Open your files: Launch WPS Spreadsheets and open your existing Excel workbooks directly without losing any formatting or data.
Fully compatible with Microsoft Excel formats including .xlsx, .xls, and .csv.Lightweight installation that consumes fewer system resources, reducing the risk of application crashes.Familiar tabbed user interface ensuring a seamless migration with zero learning curve.Free to use with a comprehensive suite of powerful built-in spreadsheet functions.
microsoft office alternative - wps office

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.