Can't Find Project or Library; also can't access VBA Codes or "References"

jewkes6000

Board Regular
Joined
Mar 25, 2020
Messages
60
Office Version
  1. 365
Platform
  1. Windows
I have a .xlsm file with a ton of macros. One of my co-workers was using it and suddenly started getting the "Can't Find Project or Library" error. I've researched on the internet and a common solution is to go into the VB editor and check the references; however, I can't even access the reference box. Whenever I open the VB Editor (Alt+F11), I can do anything in the editor. I can select "Tool" then "References"; however, nothing happens when I click it. Further, when I open up a module, I can't see my code. I've attached a screenshot of what this looks like. It's just a blank screen.

A couple things to note:
- It only happens with this Excel file. Other macro enabled files work fine
- With this file, we gate the same issue on both mine and my co-workers computer.
- I've also tried registering a library file by using the run command as explained in the link below, but that didn't work either.
- When I click on a UserForm in the VB Editor, I get an error which says "Module not found" (see 2nd screenshot below)

Any suggestions or help is much appreciated.

Thank you.

1613779443920.png



1613779485611.png
 
I suffer from this and am convinced its network related causing the problem. However, my boss came up with a fantastic solution that works a charm. We have a back up file, however this does not have up to date information in it. To overcome the problem, he found that opening the backup and the file with the issue in 7-Zip, navigate to the "xl" sub folder and replace the vbaProject.bin file with the one from a working backup. Works a charm and literally takes seconds with a drag and drop. Only caveat is that you need a backup with an uncorrupted version of the vbaProject.bin
 

Attachments

  • Project Library.JPG
    Project Library.JPG
    71.2 KB · Views: 40
Upvote 1

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
I suffer from this and am convinced its network related causing the problem. However, my boss came up with a fantastic solution that works a charm. We have a back up file, however this does not have up to date information in it. To overcome the problem, he found that opening the backup and the file with the issue in 7-Zip, navigate to the "xl" sub folder and replace the vbaProject.bin file with the one from a working backup. Works a charm and literally takes seconds with a drag and drop. Only caveat is that you need a backup with an uncorrupted version of the vbaProject.bin
I only registered to thank you man! Other solutions mentioned here failed me, but yours worked a charm, saving a lot of work. Thanks again ! :)
 
Upvote 0
I suffer from this and am convinced its network related causing the problem. However, my boss came up with a fantastic solution that works a charm. We have a back up file, however this does not have up to date information in it. To overcome the problem, he found that opening the backup and the file with the issue in 7-Zip, navigate to the "xl" sub folder and replace the vbaProject.bin file with the one from a working backup. Works a charm and literally takes seconds with a drag and drop. Only caveat is that you need a backup with an uncorrupted version of the vbaProject.bin
This solution worked for me as well. THANK YOU.

I'd like to add that I, too, believe the cause to be network-related. I've found that if I open a macro-enabled workbook or a workbook linked to the macro-enabled workbook from a VPN-only accessible location and do not save and close the workbook before the VPN disconnects, I get this corruption.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top