Fix Excel VBA “Can't Find Project or Library” Errors Across Office Versions
Question details
Resolve a VBA project or library compile error that occurs when an Excel workbook is opened in a different Office version.

- Product
- Microsoft Excel VBA
- Device & OS
- not provided
- Scenario
- A workbook compiles in Excel 2016 but produces a library-related compile error in Excel 2010.
- Observed behavior
- Excel 2010 displays “Compile error: Can't find project or library” even though no references are marked as missing.
Open the workbook on both the working and affected computers, and note their Excel versions and installed updates. Make sure you can access the VBA editor and view the workbook's references.
Update Office and compare VBA references
Use this approach to check for update differences and library versions, even when no reference is marked as missing.
On the affected computer, use Windows Update to check for available Office updates. On installations with the option, open Excel and select File > Account > Update Options > Update Now.
In Excel, press Alt+F11 to open the VBA editor, select the workbook's project, and choose Tools > References.
In Tools > References on each computer, compare the checked libraries, their versions, and the displayed locations. Investigate any reference marked MISSING or any version-specific library that differs between systems.
After correcting an identified reference, select Debug > Compile VBAProject in the VBA editor. Do not remove a reference unless you know the workbook no longer needs it.

Use late binding for external Office libraries
Use late binding when the workbook automates another Office application and a version-specific reference causes compatibility problems.
Work with Excel Files in WPS Spreadsheet
WPS Office is a free, lightweight Office alternative with a familiar interface and support for common Excel formats, making it easier to move everyday spreadsheet work between applications. It does not fix Microsoft Excel VBA reference errors, and macro compatibility should be checked separately.

Frequently Asked Questions
Why does the error appear when no reference is marked as missing?
A library version or another compatibility difference may still affect compilation. In the VBA editor, compare Tools > References on the working and affected computers, then use Debug > Compile VBAProject to investigate.
How do I check VBA references in Excel?
Press Alt+F11, select the workbook's project in the VBA editor, and choose Tools > References. Compare the checked libraries and their displayed locations with those on the working computer.
What is late binding in Excel VBA?
Late binding declares an external application as Object and creates it at run time, for example with CreateObject("Word.Application"). It can reduce reliance on a version-specific reference, but the target application and required features must still be available.
Should I remove every VBA reference to fix the error?
No. In Tools > References, change or remove a reference only after identifying the dependency and confirming that the code no longer needs it. Compile and test the workbook afterward.
Can WPS Office repair an Excel VBA library reference?
No. Resolve the reference or code issue in Microsoft Excel's VBA editor. WPS Spreadsheet can be an alternative for everyday Excel-format files, but macro compatibility must be checked separately.




