XL: Deleted Project or Library Listed Twice In ReferencesLast reviewed: September 2, 1997Article ID: Q110755 |
The information in this article applies to:
SYMPTOMSIf you delete a project (.XLS, .XLA) or library (.OLB) file from the hard drive that is referenced by a Visual Basic module, the project or library may be listed twice in the Available References list for the Visual Basic module (even when you close and reopen the workbook that contains the reference). This behavior may also occur if you move a project or library to a directory on the hard drive other than the directory you installed Microsoft Excel to, or to a directory that is contained in your path statement in the AUTOEXEC.BAT file. This behavior does not create a problem, but it may be confusing.
CAUSEYou may encounter the above behavior if you delete a referenced project or library from the hard drive in the same session of Microsoft Excel while the workbook containing the reference is closed, and if all of the following conditions are true:
WORKAROUNDTo remove the "extra" reference to the missing project or library, you must exit Microsoft Excel. NOTE: If the first reference to the missing project or library contains the prefix "MISSING:", you can resolve this problem by clearing the check box next to that reference.
MORE INFORMATIONIn a Visual Basic module, you can use the References command on the Tools menu to add a project or library as a reference to your module. This allows you to access information in the project or library directly from your module. For example, if you add the project TASK.XLS to a module in BOOK1.XLS using the References dialog box, you can run any procedure contained in TASK.XLS from any module in BOOK1.XLS using only the procedure name. When you add a project or library to a module using the References dialog box, the project or library is added to the Available References list and the check box next to the reference is selected. The added project or library remains available to the workbook you added it to unless you clear the check box manually from the Available References list, or you move or delete the project or library from the hard drive. When you open a workbook that contains references to a project or library, Microsoft Excel first searches for the project or library in the directory the project or library was located when you added it. Then the following directories are searched (not necessarily the exact order):
No Reference FoundIf the project or library is not found, it is listed with the prefix "MISSING:" in the Available References list. If the project or library is not found in the same session of Microsoft Excel that it was added, and the conditions listed above are true, the reference will be listed a second time and the check box next to it will be cleared.
Another Reference Found with Same NameIf the project or library is not found, but a project or library with the same name is found in a directory in the search order listed above, the found project or library replaces the previous one in the Available References list. If the project or library is not found in it's original location in the same session of Microsoft Excel that it was added, and the conditions listed above are true, the reference will be listed a second time and the check box next to it will be cleared.
REFERENCESFor a definition of a Referenced Project, choose the Search button in Help and type:
referenced project |
Additional query words: 5.00 5.00c 7.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |