The information in this article applies to:
SYMPTOMSIn Microsoft Excel, when you open a workbook that contains a reference to another workbook or add-in, you may receive the following error message:
CAUSE
You can access functions and macros in another workbook by establishing a
reference to that workbook. This reference is established by choosing the
References command from the Tools menu and then selecting the workbook
containing the functions and/or macros.
If Microsoft Excel can find the file in any of these locations, the reference will be successfully established. If the file cannot be found, you may receive the error message "Can't find project or library." WORKAROUNDMicrosoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web: http://www.microsoft.com/support/supportnet/overview/overview.aspTo avoid this error message, use either of the following methods. Method 1Move the workbook that is referenced to any of the locations specified above.Method 2Use the Run method of the Application instead of using the References command on the Tools menu.For example, if you have the following macro in a workbook that has a reference established to the add-in XLODBC.XLA:
You could replace this macro with the macro below. You do not need to establish a reference to XLODBC.XLA to run this macro:
MORE INFORMATIONFor additional information, please see the following articles in the Microsoft Knowledge Base: Q124277 XL5 Err Msg: "Can't Find Project or Library" Running Macro REFERENCES"Developing Microsoft Excel 5 Solutions," Eric Wells, Microsoft Press, pages 576-577. Additional query words: addin locate
Keywords : kbcode kbprg PgmHowto |
Last Reviewed: November 9, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |