Forum Discussion
VBA error - Can't find project or library
Hi,
I've been dealing with corrupt Excel files for months and months, often resorting to fully rebuilding quite complex models. The files are corrupt when the VBA modules loose the library. I don't know why it happens, but this message appears "Can't find project or library". The file works, but all VBA is lost.
I have now found a solution that is surprisingly easy and hope by sharing it many people will be saved hours of frustration.
Process:
I save my files in a OneDrive and access them in the Excel App, via windows explorer - the corrupt files does not work. If I go to the SharePoint and open the file in the web browser (VBA and other active controls wont work in this environment) and then select to open the file in the Excel App from the web browser, all VBA libraries are restored and macros work again. From there "Save As" back to the original location and you're good to go!
I hope this works for you.
- stevenwm94Aug 26, 2021Copper Contributorrichard10, this worked for me! you're awesome!