This site requires JavaScript to be enabled
Knowledge Home
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:

  1. Open the Microsoft Access or Excel file that is giving you the error message.
  2. Make sure the Excel sheet or Data sheet that has the buttons or functions in question is selected.
  3. Simultaneously press the ALT and F11 keys on your keyboard to switch to the Visual Basic Editor in a new window (as seen below).



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



  5. 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).



  6. If there is a check mark in the check box next to the missing type or object library, then un-check the check box.
  7. Click OK.
  8. Exit the Visual Basic Editor.
  9. Save the original Access or Excel file.
  10. Try using the buttons or functions in question that previously didn't work and they should now work normally.

For further information, please consult: https://support.microsoft.com/en-us/kb/282331


Expand/Collapse Comments
:     
Was this helpful?
YesYesNoNo
Rate this article