XL5: "Cannot Find Macro..." Using Run Method with Add-in MacroLast reviewed: September 12, 1996Article ID: Q112219 |
The information in this article applies to:
SYMPTOMSIn a Visual Basic module in Microsoft Excel, if you use the Run method of the Application object to run a macro located in an add-in, you may receive the following error message
Run-time error '1004': Cannot find macro '<ADDIN.XLA>!<Addin_Macro>'where <ADDIN.XLA> is the name of the add-in that contains the macro, and <Addin_Macro> is the name of the macro that you want to run.
CAUSEThis error occurs when the add-in that contains the procedure you used with the Run method is not currently open. Even if the add-in is fast loaded by the following line in the EXCEL5.INI file
OPEN=/f C:\EXCEL\ADDIN.XLAwhere ADDIN.XLA is the add-in file.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft Excel for Windows version 5.0c.
WORKAROUNDTo use the Run method to run a macro that is contained in an add-in without receiving the error message above, do any of the following:
MORE INFORMATIONWhen you fast load an add-in, for example by using the /f switch in the EXCEL5.INI file as explained above, any menus and toolbars contained in the add-in are available, but the add-in file itself is not actually loaded, and any macros contained in the add-in are not loaded. When you demand load an add-in, either by opening the add-in file, or with the following line in the EXCEL5.INI file
OPEN C:\EXCEL5\ADDIN.XLAeverything in the add-in is available, including any macros in the add-in. Therefore, when you demand load and add-in, you do not receive the above error message when you use the Run method to run a macro located in the add-in. For more information about using the /F switch to load an add-in, query on the following words in the Microsoft Knowledge Base:
fast and load and add-in |
KBCategory: kbtool kbbuglist kbfixlist
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |