One way to Fix “Can't Find Project or VBA Library Error”

actjfc

Active Member
Joined
Jun 28, 2003
Messages
416
My Excel friends,

All over the Internet there are explanations about solving this issue in an XLSM file. However, none of the available “solutions” solved my problem. I found a “workaround” easy FIX that may fix your specific file, I will explain the process step by step:

1.- In Windows Explorer, make a backup of your “Can't Find Project or Library.xlsm” file. (Copy and Paste in Windows Explorer)

2.- In Windows Explorer, change a bit the filename of your “Can't Find Project or Library.xlsm” file. Close the Excel file first prior to changing the name. Otherwise, you will not be able to do it.

3.- Run Excel and by using the Excel menu open your “Can't Find Project or Library (new filename).xlsm” file.

4.-When opening, DO NOT ENABLE MACROS. If you Enable Macros, it triggers the “Can't Find Project or VBA Library Error”. If you do not change the filename (Step 2), this option to DO NOT ENABLE MACROS does not show up.

5.-Now SAVE THE FILE AS EXCEL WORKBOOK XLSX. Now you should have “Can't Find Project or Library (new filename).xlsx"

6.- CLOSE the “Can't Find Project or Library (new filename)”.xlsx (Closing it is Key. At this step, I have seen that some old non-usable XLSM modules still show up in the xlsx before closing it, so close it!. These "modules" should not be there. If you do no close at this step these modules may misbehave later on. It happened to me!)

7.- Reopen the “Can't Find Project or Library (new filename)”.xlsx (at this step your file is recovered, but you lost all your VBA code in it. There must not be any VBA modules in this xlsx file. All VBA modules should disappear)

8.- Save As again the file, this time as XLSM, add the word "recovered" to the name, you should have now “Can't Find Project or Library (recovered).xlsm” Close it again, now open it again and VERIFY that the ugly message "Can't Find Project or VBA Library Error" does not show up. Make a few backups in different locations!!!!

9.- If you have a prior working old version of your file, you may copy the VBA code from there to the new one, and rebuild the buttons or other Excel features in your fresher recovered xlsm file. (Extra work but better than starting all over again)

The main Excel work is recovered at step 7, it worked for me, and I wanted to share the process with the fellow Excel warriors at Mr. Excel. I recovered one 500 MB Excel file that I have been working in for at least six months. I have many backups, but anyways I would have lost some fundamental changes and hours of work. I was able to recover all my customized VBA macros taking the code from prior versions.

Do not forget to backup up regularly! Save regularly not just in Excel, do it in Windows Explorer copy and paste your file every hour or so, you will end up with many files with the same filename plus "- Copy (x).xlsm", x =1,2,3.... It is worth the extra seconds it takes. It is not the same as having the last version automatic xlk backup from Excel, it happened to me, it was also corrupted wit the same message. (I use Excel 2019 and Windows 10)

Please, like it and comment if it helped you.

Thanks!
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
My Excel friends,

All over the Internet there are explanations about solving this issue in an XLSM file. However, none of the available “solutions” solved my problem. I found a “workaround” easy FIX that may fix your specific file, I will explain the process step by step:

1.- In Windows Explorer, make a backup of your “Can't Find Project or Library.xlsm” file. (Copy and Paste in Windows Explorer)

2.- In Windows Explorer, change a bit the filename of your “Can't Find Project or Library.xlsm” file. Close the Excel file first prior to changing the name. Otherwise, you will not be able to do it.

3.- Run Excel and by using the Excel menu open your “Can't Find Project or Library (new filename).xlsm” file.

4.-When opening, DO NOT ENABLE MACROS. If you Enable Macros, it triggers the “Can't Find Project or VBA Library Error”. If you do not change the filename (Step 2), this option to DO NOT ENABLE MACROS does not show up.

5.-Now SAVE THE FILE AS EXCEL WORKBOOK XLSX. Now you should have “Can't Find Project or Library (new filename).xlsx"

6.- CLOSE the “Can't Find Project or Library (new filename)”.xlsx (Closing it is Key. At this step, I have seen that some old non-usable XLSM modules still show up in the xlsx before closing it, so close it!. These "modules" should not be there. If you do no close at this step these modules may misbehave later on. It happened to me!)

7.- Reopen the “Can't Find Project or Library (new filename)”.xlsx (at this step your file is recovered, but you lost all your VBA code in it. There must not be any VBA modules in this xlsx file. All VBA modules should disappear)

8.- Save As again the file, this time as XLSM, add the word "recovered" to the name, you should have now “Can't Find Project or Library (recovered).xlsm” Close it again, now open it again and VERIFY that the ugly message "Can't Find Project or VBA Library Error" does not show up. Make a few backups in different locations!!!!

9.- If you have a prior working old version of your file, you may copy the VBA code from there to the new one, and rebuild the buttons or other Excel features in your fresher recovered xlsm file. (Extra work but better than starting all over again)

The main Excel work is recovered at step 7, it worked for me, and I wanted to share the process with the fellow Excel warriors at Mr. Excel. I recovered one 500 MB Excel file that I have been working in for at least six months. I have many backups, but anyways I would have lost some fundamental changes and hours of work. I was able to recover all my customized VBA macros taking the code from prior versions.

Do not forget to backup up regularly! Save regularly not just in Excel, do it in Windows Explorer copy and paste your file every hour or so, you will end up with many files with the same filename plus "- Copy (x).xlsm", x =1,2,3.... It is worth the extra seconds it takes. It is not the same as having the last version automatic xlk backup from Excel, it happened to me, it was also corrupted wit the same message. (I use Excel 2019 and Windows 10)

Please, like it and comment if it helped you.

Thanks!
After point number 4, you are able to open the modules by pressing Alt+F11 so you can copy all your modules to a text file. Then proceed with the step number 5 and close the file, then open it again and enter again to the modules (Alt+F11) and paste the code inside. Finally save the as excel workbook.xlsm. And thats it you dont loose anything.
 
Upvote 0

Forum statistics

Threads
1,224,814
Messages
6,181,128
Members
453,021
Latest member
Justyna P

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