The message “Project is Unviewable” appears in the Visual Basic for Applications (VBA) editor when Excel blocks access to a macro project’s code tree. Unlike a standard password prompt that asks for your credentials, this alert stops you from entering a password entirely. It occurs when a workbook is locked under conditions where the VBA engine cannot safely initialize the project structure.
Fast Fix:
If the workbook is currently shared or co-authored, unshare it. Go to the Review tab, select Unshare Workbook (or disable legacy workbook sharing), and save the file. If you are opening an add-in (
.xlam) or a digitally signed project, close all Excel instances via Task Manager, reopen Excel, and open the source file directly using File > Open.
Why the Project Is Locked
VBA projects become unviewable when Excel enters a state where loading the module hierarchy would risk project corruption or violate a security lock.
The three primary causes are:
- Legacy Shared Workbook mode (
.xls/.xlsm): When multiple users share a workbook via Excel’s legacy sharing feature, VBA locks the project permanently to prevent simultaneous code modifications. - Add-in or Protected View session conflicts: An add-in (
.xlam) or compiled binary loaded read-only in the background may refuse UI expansion in the Project Explorer. - Corrupted VBA project stream (
vbaProject.bin): If a workbook suffers an incomplete save or binary header mismatch, Excel can still run the compiled p-code while marking the source module tree unviewable.
Diagnostic Flowchart: Distinguishing the Cause
Can you click the project in VBA Project Explorer?
│
├── Pop-up: "Project is Unviewable" (No password field appears)
│ │
│ ├── Check Excel Title Bar: Does it say "[Shared]"?
│ │ └── YES ──► Turn off Legacy Sharing (Review > Unshare Workbook).
│ │
│ ├── Is the file an Add-in (.xlam / .xla) or marked Read-Only?
│ │ └── YES ──► Check Workbook Properties & IsAddin status.
│ │
│ └── Is the file from an external source or email?
│ └── YES ──► File is blocked by Windows Security (Mark of the Web).
│
└── Pop-up: "Password" dialog box appears
└── Project is functioning normally; it only requires the correct password.
Primary Solutions
1. Turn Off Legacy Shared Workbook Mode
The most frequent cause of an unviewable project is the legacy “Shared Workbook” feature. When active, [Shared] appears next to the file name in the top title bar.
- Open the workbook in Excel.
- Go to the Review tab on the Ribbon.
- Look for the Protect or Share group.
- Click Unshare Workbook (or click Share Workbook (Legacy) and uncheck “Use the old shared workbooks feature”).
- When prompted that this will make the file exclusive to you, click Yes.
- Save and close the file, then reopen it.
- Press
Alt + F11to open the VBA Editor. The project will now accept password entry or display its modules normally.
If your team relies on multi-user editing, note that legacy sharing is incompatible with macro maintenance. For a detailed breakdown of shared-state locking issues, see VBA Project Locked: Fixing “Project is unviewable” in Shared Workbooks.
2. Unlock Add-Ins (.xlam / .xla) via the Properties Window
When editing an Excel Add-in, the file does not display standard worksheet windows. If the add-in project was locked during distribution, clicking it in the Project Explorer may throw the “Project is Unviewable” error if the host workbook context is hidden.
- In Excel, press
Alt + F11. - In the Project Explorer (
Ctrl + R), click the add-in project name. - In the Properties Window (
F4), locate theIsAddinproperty of theThisWorkbookobject. - Temporarily change
IsAddinfromTruetoFalse. - Return to the Excel application window; a visible sheet will appear.
- Save the file, return to the VBA editor, and expand the project tree.
- After finishing your code edits, set
IsAddinback toTruebefore saving the final version.
3. Unblock “Mark of the Web” on Downloaded Files
If the workbook was downloaded from a web browser, SharePoint, or an email client, Windows may block access to the underlying macro container to protect the system.
- Close Excel completely.
- Open File Explorer and browse to the saved
.xlsmor.xlsbfile. - Right-click the file and select Properties.
- At the bottom of the General tab, look for the Security section: “This file came from another computer and might be blocked to help protect this computer.”
- Check the Unblock box and click Apply > OK.
- Reopen the file.
If your macros are blocked from running even after unblocking the file, you may need to add the folder path to Excel’s Trust Center. See “Macros have been disabled”: Troubleshooting the “Trusted Locations” security block for proper folder setup.
4. Clearing “Ghost” Excel Processes from Memory
Sometimes Excel keeps a phantom process open after a macro crash. This orphan process holds a file lock on the VBA storage stream, causing subsequent attempts to view the project to fail.
- Press
Ctrl + Shift + Escto open Windows Task Manager. - Select the Details tab.
- Sort by Name and locate all entries named
EXCEL.EXE. - Right-click each background instance and select End Task.
- Launch Excel fresh and open your file.
If macro crashes frequently leave orphaned processes running in the background, review Excel Crashing on Close: How to properly clear Object variables from memory.
Recovering a Corrupted VBA Project Stream
If the steps above do not clear the error and the file was never shared, the internal binary stream (vbaProject.bin) inside the workbook archive may be damaged.
Hard Stop & Safety:
Always make a duplicate copy of the
.xlsmor.xlsbfile before attempting extraction or binary modifications. Do not perform recovery steps directly on your primary working copy.
To extract your code from a corrupt project structure:
- Make a copy of the workbook and change its file extension from
.xlsmto.zip. - Open the
.zipfolder and navigate to thexlsubfolder. - Locate the
vbaProject.binfile. - Extract
vbaProject.binto your desktop. - Open a fresh, clean Excel workbook, save it as a new
.xlsmfile, and close it. - Open the new
.xlsmfile as a.ziparchive, drop the extractedvbaProject.bininto itsxlfolder (replacing the empty one), and rename the file back to.xlsm. - Launch the new file.
If the file structure itself prevents extraction, refer to How to recover a “Corrupt” Excel file using the XML extraction method for manual XML repair steps.
Summary Checklist
- Shared Workbook status removed? Ensure
[Shared]does not appear in the title bar. - IsAddin toggle tested? Switch
IsAddintoFalseon.xlamfiles to expose the UI. - File unblocked? Ensure Windows File Properties does not have an active security block.
- All Excel tasks reset? Clear lingering
EXCEL.EXEtasks from Task Manager.