Kevin Rea
Kevin Rea

Reputation: 1

Microsoft Excel VBA cannot find projects or library

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.

Upvotes: 0

Views: 1088

Answers (2)

Elendhur
Elendhur

Reputation: 13

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.

Upvotes: 0

BuilderQ
BuilderQ

Reputation: 1

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.

Upvotes: 0

Related Questions