can t find project or library excel

Running Windows 10 Microsoft Excel 16 64 bit

Just encountered this issue — Opening a normal file with a small amount of VBA coding.

On opening file today, ran into error «Can’t find project or library»

Error appeared in a few files, and after restarting was localized to a single file.

Содержание

  1. 1 Answer 1
  2. Not the answer you’re looking for? Browse other questions tagged excel vba or ask your own question.
  3. Linked
  4. Related
  5. Hot Network Questions
  6. Support and feedback
  7. Part 1: What is the cause of this Error?
  8. Part 2: How to Repair Corrupt Excel File
  9. Part 3: Repair MS Excel File with Excel Repair Tool
  10. Microsoft Excel Repair Tool

1 Answer 1

  1. panic
  2. Repaired Microsoft Office
  3. removed personal.xlsb file from XLStart to test
  4. Opened blank excel, Alt + F11 to open VBA
  5. Tools -> References -> Object Library
  6. Search for missing objects
  7. Corrected if found
  8. These steps didn’t resolve, so renamed the file opened in safe mode (win + R type Excel.exe /safe)
  9. Updated dates, changed a few items and saved
  10. Opened file normally, issue resolved.

Alternatively, try to have someone else open the file/update name and change a few things for you. the file is likely corrupt

Not the answer you’re looking for? Browse other questions tagged excel vba or ask your own question.

Linked

Hot Network Questions

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

site design / logo © 2019 Stack Exchange Inc; user contributions licensed under cc by-sa 4.0 with attribution required. rev 2019.11.15.35459

You can’t run your code until all missing references are resolved.

This error has the following causes and solutions:

A referenced project could not be found, or a referencedobject library corresponding to the language of the project could not be found.

Unresolved references are prefixed with MISSING in the References dialog box. Select the missing reference to display the path and language of the missing project or library. Follow these steps to resolve the reference or references:

To resolve the references

Display the References dialog box.

Select the missing reference.

Use the Browse dialog box to find the missing reference.

Click OK.

Repeat the preceding steps until all missing references are resolved.

Once you find a missing item, the MISSING prefix is removed to indicate that the link is reestablished. If the file name of a referenced project has changed, a new reference is added, and the old reference must be removed. To remove a reference that is no longer required, simply clear the check box next to the unnecessary reference. Note that the references to the Visual Basic object library and host-application object library can’t be removed.

Applications may support different language versions of their object libraries. To find out which language version is required, click the reference and check the language indicated at the bottom of the dialog box. Object libraries may be standalone files with the extension .OLB or they can be integrated into a dynamic-link library (DLL) They can exist in different versions for each platform. Therefore, when projects are moved across platforms, for example, from Macintosh to Microsoft Windows, the correct language version of the referenced library for that platform must be available in the location specified in your host application documentation.

Object library file names are generally constructed as follows:

Windows (version 3.1 and earlier): Application Code + Language Code + [Version].OLB. For example: The object library for French Visual Basic for Applications, Version 2 was vafr2.olb. The French Microsoft Excel 5.0 object library was xlfr50.olb.

Macintosh: Application Name Language Code [Version] OLB. For example: The object library for French Visual Basic for Applications, Version 2 was VA FR 2 OLB. The French Microsoft Excel 5.0 object library was MS Excel FR 50 OLB.

If you can’t find a missing project or library on your system, contact the referencing project’s author. If the missing library is a Microsoft application object library, you can obtain it as follows:

If you have access to Microsoft electronic technical support services, refer to the technical support section of this Help file. Under electronic services, you will find instructions on how to use the appropriate service option.

If you don’t have access to Microsoft electronic technical support services, Microsoft object libraries are available upon request as an application note from Microsoft. Information on how to contact your local Microsoft product support organization is also available in the technical support section of this Help file.

For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).

Interested in developing solutions that extend the Office experience across multiple platforms? Check out the new Office Add-ins model. Office Add-ins have a small footprint compared to VSTO Add-ins and solutions, and you can build them by using almost any web programming technology, such as HTML5, JavaScript, CSS3, and XML.

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.

Amy Dennis

Nov 13,2019 • Filed to: Repair Corrupt Files • Proven solutions

When using MS Excel document or MS Access that assimilate functions or buttons which need VBA (Visual Basic Applications) for the Macros to perform some assigned task, the user may get a compilation error “Can’t find project or library”.

Part 1: What is the cause of this Error?

  • This error is usually caused by the user’s MS Access or MS Excel program. The reason is that the program has a reference to an object or type of library which is missing and hence not found by the program. Accordingly, the program cannot use VB or Micro based functions or buttons. Therefore an error message is sent.
  • Sometimes a library may be toggled on or toggled off causing a missing link between library and program code. So the compilation error is issued.
  • Since there are standard libraries so missing library sounds a bit of least chance. The other possible reason, in that case, is that library miss-match is the cause of error. For example, the user may have a library (sat Outlook) 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 this compilation error.
  • Another scenario for the same error message is concerning the use of Microsoft XP which include 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).

Part 2: How to Repair Corrupt Excel File

For different situations some solutions to rectify the problem or to repair corrupted Excel file are always there. Like finding out the missing library or the cause of mismatch if it exists. The library is then added or alternatively the code may be rechecked to link to the appropriate library.

How can it be done?

Following the steps:

Step 1. Open the MS Excel file, giving an error message.

Step 2. Ensure that the sheet that has defined functions or buttons is selected.

Step 3. Press “ALT and F11 keys”, for VB Editor in a new window (as below).

Step 4. Click on Tools menu and then select References from pulled down menu, as shown

Step 5. Following dialog box will display ‘Missing object library or type’ is indicated, as shown below

Step 6. As in above display if check mark exists with missing library, uncheck it and click OK

Step 7. Exit and save the original Excel file.

Now check to ensure respective functions are working properly.

Part 3: Repair MS Excel File with Excel Repair Tool

Third-party Excel file repair software are there to resolve all such matters quickly and accurately. One of the Best Excel file Repair software, to repair and recover damaged/ corrupt Excel files is described below.

This Excel file repair software is available for single as well as multiple systems. The file repairing tool supports all versions of windows and supports Excel 2011 for Mac. This permits repair corrupted Excel file (.XLS and .XLSX), and restore all the data from corrupt to a new Excel file.

Microsoft Excel Repair Tool

  • Recovers all kind of data stored in damaged excel file such as tables, charts, formulas, comments, images, etc.
  • Restore all of your corrupted excel files to their original standing.
  • Preview the repaired excel file in real-time,see how much of the file has been recovered as it is being repaired.
  • All kind of MS office corruption errors (for XLS and XLSX files only) can be handled with this tool.
  • This excel file repair tool can be used on both windows and Mac platforms in order to repair corrupt excel file.
  • All kind of MS office corruption errors (for XLS and XLSX files only) can be handled with this tool.
  • This excel file repair tool can repair damaged files of all versions from 2000 to 2016 that includes 2000, 2003, 2007, 2010, 2013, etc.

Step 1 Select corrupt Excel file from drive and search.

Step 2 Chooes one or all corrupt Excel file start to repairing process.

Step 3 Preview the repaired Excel file.

Step 4 Select a preferred location to save repaired Excel file.

In addition to Excel Repair Tool or Excel file repair software, a few tips may be helpful for quick fixes (to recover or repair corrupted Excel file).

Источник: computermaker.info

Понравилась статья? Поделиться с друзьями:
Ок! Компьютер
Добавить комментарий