0

I performed a Windows update yesterday 12/13/2020 and now when I open an Excel file with a macro, I get "Can't find project or library".

enter image description here

In Excel, I choose Developer tab, then click Macros... no macros show up (there should be 2), in fact when I try to type in a name of a new macro it will not give me the option to Create it.

Here is an interesting thing in VBA, I go to Tools then References. A box should show up, but I get what appears to be a partial box, like it was cutoff on the right hand side.

enter image description here

I get the "Can't find project or library" error when exiting the file also.

4
  • So, if you click on Module1 or Module2, they are empty? Have you tried to export those modules to *.bas files to see if you can recover the code this way? Commented Dec 16, 2020 at 3:43
  • 1
    Either your workbook or your Excel installation is corrupt. Start by finding out which one it is. Commented Dec 16, 2020 at 3:46
  • Were any of your macro enabled files downloaded from the internet? Or did you create them all? Commented Dec 16, 2020 at 4:40
  • If you click on Tools\References, are there some previously selected library gone or changed name? Commented Dec 16, 2020 at 5:15

2 Answers 2

0

I'm routinely running into this identical issue. A prompt with "Can't find..", a inaccessible module in IDE, and an eventual Excel crash. I'm certain it's not the Excel install since a mass of other VBA driven workbooks operate without issue.

The work around I've seen promoted is to open the problem file in another environment (desktop) other than your own. I share the broken file with a co-worker who can open the file without error then save and close. A majority of the time I'm then able to open the file and continue without any further hangups and without having to adjust a thing in VBA or otherwise.

Sign up to request clarification or add additional context in comments.

Comments

0

I have experienced exactly the very same issue on Excel 365 with .xlsm documents located on SharePoint.

"Can't find project or library" prompt fired even when entering values in one cell. It also popped up when exiting the file, preventing the document to be saved. Further, I experienced that the prompt also fires when working on other documents while keeping the affected document open.

The References dialogue box could not be explored just as the OP describes; all the active modules were not viewable/explorable, leaving artifacts (as in figure) when dragged or moved.

enter image description here

The workaround in that case is to have the document opened and saved by another user who has access. This solved the issue every time, with no need to modify any VBA settings.

While I cannot explain the cause of the issue, I confirm that a fresh install of Excel (in line with what reported by @BuilderQ) would still result in the issue to recur.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.