VBA & Macro Problems

How to Fix Closed Workbooks Still Appearing in the Excel VBA Project Window

Rana GarciaRana Garcia Nov 13, 2026 868 views

Question details

The user needs to remove closed Excel workbooks from the VBA Project window and prevent the Visual Basic Editor or Excel from crashing when expanding them.

How to Fix Closed Workbooks Still Appearing in the Excel VBA Project Window
Product
Microsoft Excel Visual Basic Editor
Device & OS
not provided
Scenario
After closing macro-enabled workbooks in Excel, the user opens the VBA Project window and sees closed workbook entries still listed; expanding them can crash the editor or Excel.
Observed behavior
Closed Excel workbooks remain visible in the VBA Project window, and expanding them can cause the Visual Basic Editor or Excel to crash.
Before you start

Save any open macro-enabled workbooks, note the Excel version and update channel via File > Account > About Excel, and close the Visual Basic Editor and any unnecessary Excel sessions before troubleshooting.

Solution 1Recommended

Restart Excel, Reboot the PC, and Install the Latest Office Updates

Use this first because it clears the VBE project cache and addresses known Visual Basic Editor bugs that leave closed workbooks visible.

Ghost workbook entries are generally a known Visual Basic Editor bug. Restarting Excel removes the in-memory project handles, while Office updates deliver the latest fixes for the editor and macro components.

1
Close the Visual Basic Editor and all Excel windows

In Excel, close each workbook and the VBA editor window completely, or click File > Exit to quit Excel.

2
Restart Excel or the computer

Reopen Excel and check the VBA Project window; if entries remain, select Start > Power > Restart to reboot the computer.

3
Install Office updates

Open Excel, click File > Account > Update Options > Update Now, and restart Excel after the updates finish.

4
Reopen the VBA Project window

Press Alt+F11 and confirm that closed workbooks no longer appear before resuming work.

Restart Excel, Reboot the PC, and Install the Latest Office Updates
Expected result: After a fresh restart and Office updates, the VBA Project window should no longer list closed workbooks.
Free Microsoft Office alternative

Use WPS Office Free as a Lightweight Alternative When Excel VBA Issues Disrupt Work

The ghost-workbook issue belongs to Microsoft Excel's Visual Basic Editor, and WPS Office does not patch that Microsoft bug. WPS Office is a free, lightweight, easy-to-use alternative that opens and saves Excel formats, offers a familiar ribbon UI, and makes migration from Excel straightforward.

Avoids dependence on Microsoft Excel's VBA Project window while working with common spreadsheet filesOpens and saves .xlsx and .xlsm files with Microsoft Office format compatibilityFree, lightweight, and easy-to-use Office suite with a familiar ribbon UILets you migrate existing Excel workbooks and continue editing with familiar tools
microsoft office alternative - wps office

Frequently Asked Questions

Why do closed workbooks still appear in the VBA Project window?

It is usually a known Visual Basic Editor bug. Lingering object references, circular references, public or global object variables, and active Excel processes can keep project handles visible after workbooks close.

How do I remove a closed workbook from the VBA Project window?

Close the VBA editor and all Excel windows, restart Excel or the computer, install Office updates via File > Account > Update Options > Update Now, and check Task Manager for lingering Excel.exe processes. Then reopen the editor with Alt+F11.

Can WPS Office fix the Excel VBA Project window bug?

WPS Office does not patch Microsoft Excel's Visual Basic Editor, but it is a free, lightweight alternative that can open and save Excel formats including macro-enabled workbooks.

Will setting objects to Nothing prevent closed workbooks from appearing?

Yes, in many cases. Release module-level or global object variables in the Workbook_BeforeClose event and avoid circular references between class modules to reduce lingering workbook projects.

Does ending Excel processes in Task Manager lose unsaved work?

Yes, ending Excel processes can close unsaved workbooks. Save or confirm that you can discard changes before ending Excel.exe in Task Manager.