XL: Can't Use Visual Basic Procedure to Reference ProjectLast reviewed: March 27, 1997Article ID: Q121269 |
5.00 5.00c 7.00
WINDOWS
kbprg
The information in this article applies to:
SYMPTOMSIn Microsoft Excel, you cannot use a Visual Basic procedure to establish a reference to a project or to an object library. For example, if you turn on the Macro Recorder, and you use the References dialog box in a Visual Basic module to establish a reference to a project or an object library, nothing is recorded. NOTE: A project is any file that contains a Visual Basic for Applications module, such as an .XLS or .XLA file.
WORKAROUNDSTo establish a reference in a Visual Basic module to a project, when you will be copying the module to another computer, do either of the following:
Workbooks.Open("BOOK1.XLS") Application.Run "BOOK1.XLS!Macro1" MORE INFORMATIONFor additional information, please see the following article(s) in the Microsoft Knowledge Base:
ARTICLE-ID: Q110755 TITLE : XL: Deleted Project or Library Listed Twice In ReferencesWhen you open a Visual Basic module that references a project, Microsoft Excel searches for the referenced project file in the following directories:
1. The directory that contained the project file when you first established the reference. 2. The directory in which the file that contains the reference is located. 3. The directory in which Microsoft Excel is installed. 4. The directory in which Microsoft Windows is installed. 5. The SYSTEM subdirectory of the Microsoft Windows directory. 6. Any directory that is located in the path statement in the AUTOEXEC.BAT file. REFERENCESFor more information about the References Command (Tools Menu), choose the Search button in Help and type:
References command (Tools Menu) |
KBCategory: kbprg
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |