Notifications

Knowledge > Common Questions >
How do I resolve the error "Compile Error: Can't find project or library?"

How do I resolve the error "Compile Error: Can't find project or library?"

Article: KB0012541
Published: 2012-03-16
Last modified: 2017-01-31

How do I resolve the error "Compile Error: Can't find project or library?"

Liberty Information Services and the IT HelpDesk are aware of an issue where, when using a Microsoft Access or Excel document that integrates buttons or functions that need Visual Basic for Applications (VBA) or Macros to perform their duty, some users may encounter the following error message:

"Compile Error: Can't find project or library."

What causes this error?

This error message usually is caused by the user's Microsoft Access or Excel program having a reference to a type or object library that is missing, rendering the program not able to use Visual Basic or Macro based buttons and functions properly.

How can this issue be solved?

Please follow these steps to resolve the issue:

Open the Microsoft Access or Excel file that is giving you the error message.

Make sure the Excel sheet or Data sheet that has the buttons or functions in question is selected.

Simultaneously press the ALT and F11 keys on your keyboard to switch to the Visual Basic Editor in a new window (as seen below).

In the new Visual Basic Editor window, click on the Tools menu at the top of the screen, and then click References...

A References dialogue box will display on the screen. A missing type or object library is indicated by "MISSING:" followed by the name of the missing type or object library (an example is MISSING: Microsoft Excel 10.0 Object Library, as seen below).

If there is a check mark in the check box next to the missing type or object library, then un-check the check box.

Click OK.

Exit the Visual Basic Editor.

Save the original Access or Excel file.

Try using the buttons or functions in question that previously didn't work and they should now work normally.