XL: Macro On Workbook Is Not Defined Error While Updating LinksLast reviewed: December 1, 1997Article ID: Q117231 |
The information in this article applies to:
SYMPTOMSWhen you open a Microsoft Excel workbook that contains an external link, and then re-establish links in the workbook, you may receive the following error message:
<Macro name> on <Workbook name> is not defined or is too complexwhere <Macro name> is the name of a macro in an external workbook called <Workbook name>.
CAUSE
Case 1: The Object Is Assigned to a MacroThis problem occurs when you open a workbook that contains an object that is linked to a macro in another workbook, and you re-establish the links in the workbook. When you assign a macro to an object, and the macro is in a different workbook, a link to the workbook that contains the macro appears in the Links dialog box. If you update this link by clicking Update Now in the Links dialog box, and the workbook that contains the macro is closed, the error message appears because Microsoft Excel cannot update the link. This behavior is by design of Microsoft Excel. Note that this problem also occurs if you re-establish links in a workbook that contains an object that is linked to a macro in another workbook, and the workbook you open also contains a reference to a named range in the workbook. When you open this type of workbook, Microsoft Excel prompts you to re- establish links in the workbook. NOTE: When you open a workbook that contains an object that is linked to a macro in another workbook, and the workbook you open does not contain any other external links, Microsoft Excel should not prompt you to re-establish the links when you open the workbook. Microsoft Excel prompts you to update links if the "Ask to Update Automatic Links" check box is selected on the Edit tab in the Options dialog box. The message to re-establish links does not appear when either of the following conditions are true:
Case 2: Calling a Custom Function in an Add-InThis problem occurs when you open a workbook that contains a formula that calls a custom function in an add-in, and then re-establish the links in the workbook. This problem occurs when all of the following conditions are true:
WORKAROUNDS
Method 1: The Object Is Assigned to a MacroTo work around the problem when the object is assigned to a macro, do any of the following:
Method 2: Calling a Custom Function in an Add-InTo work around this problem when you open a workbook that calls a custom function in an add-in, do the following:
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
REFERENCES
Microsoft Excel 97For more information about assigning a macro to a graphic object or to a button on a sheet, click the Index tab in Microsoft Excel Help, type the following text
macros, runningand then double-click the selected text to go to the "Run a macro from a button or graphic control" topic.
Microsoft Excel 5.0For more information about assigning a macro to a graphic object or to a button on a sheet, click the Search button in Help and type:
assigning macros |
Additional query words: 7.00 5.00 err msg
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |