Fix “File Not Found” When Opening VBA Code in Microsoft Office
Question details
The user needs to open and edit VBA modules without a “File not found” error.

- Product
- Microsoft Office VBA editor in Access, Excel, and Word
- Device & OS
- Windows
- Scenario
- Opening VBA code in multiple Office applications.
- Observed behavior
- The VBA editor reports “File not found” across Access, Excel, and Word.
Close all Office applications before starting the repair. Make sure you have an internet connection available if Online Repair is needed.
Repair Microsoft Office and retest the VBA editor
Use Office Repair when the error appears in multiple Office applications, suggesting an installation problem rather than a single file issue.
Open Windows Settings > Apps > Installed apps, or Apps & features on Windows 10. Find Microsoft Office or Microsoft 365 in the list.
Select the Office entry and choose Modify or Change, then select Quick Repair and follow the prompts.
Reopen an affected Office app and try opening its VBA code. If the error remains, return to the Office entry in Settings, choose Modify or Change, and select Online Repair.
After repair finishes, restart Windows. Open Access, Excel, or Word and try opening the affected VBA module again.

Work with Office documents in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for working with Office documents and spreadsheets. Open compatible files to make migration easier; it does not repair Microsoft Office or its VBA editor.

Frequently Asked Questions
Why does the error appear in Access, Excel, and Word?
An error across several Office apps can indicate a damaged Office installation rather than a problem with one document or database. Try repairing Office through Windows Settings > Apps.
What if Quick Repair does not fix the VBA error?
Return to the Office installation under Settings > Apps, select Modify or Change, and run Online Repair. Restart Windows and test the VBA editor again.
Does Online Repair require an internet connection?
Yes. Connect to the internet before selecting Online Repair in the Office repair dialog.
Can WPS Office repair the Microsoft Office VBA editor?
No. Use Microsoft Office Repair to address the VBA editor error. WPS Office is an alternative for working with compatible documents and spreadsheets, not a repair tool for Office.




