While using Excel are you getting “Compile error can’t find project or library”, then here in this article follow the complete information about the Macro Compile error and also fix it easily with the given solution.
It is found that Compile error can’t find project or library or Can’t find project or library Excel 2016 is faced by the users while using the VBA (Visual Basic Applications) for the macros to perform some assigned task.
Here follow the solution to fix Excel can’t find project or library, but before moving further know the common causes responsible for getting the error.
Causes of the Error Can’t find Project or Library Excel 2016
- This error is usually caused by the user’s Excel program. The reason is that the program has the reference to an object or type of library which is missing and hence not found by the program. So the program is unable to use VB or Micro based functions or buttons. This leads to error message appearance.
- Since there are standard libraries so missing library sounds a bit of least chance. Another reason to this, in that case, is that library miss-match occurs. For example, the user may have a library version of 2007 but the reference in the code may be looking for 2010 version of that specific library. So the program fails to find the corresponding library thus issuing the compilation error.
- Sometimes a library may be toggled on or toggled off which causes a missing link issue between the library and program code. Therefore the compilation error occurs.
- Another reason for the error message is concerning the use of Microsoft XP which includes a reference to web service in VBA project. When you run this project in MS Office 2003, same compilation error appears. The reason is same i.e. object or type of library is missing (or not found).
Steps to Resolve Excel Can’t Find Project or Library:
Commonly, the application has lost reference to an object or type library resulting in the above error while using barcode macro and native VBA Functions.
To fix the Macros Compile error, follow the steps:
- Open the Microsoft Excel file that is giving you the error message.
- Make sure the Excel sheet or Datasheet 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.
- 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 checkmark in the checkbox next to the missing type or object library, then un-check the checkbox.
- Click OK > Exit the Visual Basic Editor.
- Save the original Excel file.
- Try using the buttons or functions in question that previously didn’t work and they should now work normally.
An alternative for removing the reference is to restore the referenced file to the path specified in the references dialog box. If the referenced file is in a new location, clear the “Missing:”reference and create a new reference to the file in its new location.
Hope doing this will help you to fix the error Can’t find project or library Excel 2016, but if not then make use of the automatic third-party tool, this will help you to solve the error.
Automatic Solution: MS Excel Repair Tool
The above mentioned manual solution will most probably sort out the issues and mentioned errors from Excel file. But for any other corruption or file damage most suitable option would be to make use of MS Excel Repair Tool. This is is highly competent in restoring corrupt Excel files and also retrieves data from worksheet like cell comments, charts, other data and worksheet properties. This is a professionally designed program that can easily repair .xls and .xlsx files.
Steps to Utilize MS Excel Repair Tool:
I tried my best to provide the ample information about the error and fixes. However, if you are having any additional fixes or any query then please share it with us. You can go to the comment section or on MS Excel Ask Question page.