XL: Assign Macro Dialog Box Doesn't Default to Assigned Macro

Last reviewed: February 2, 1998
Article ID: Q152406
The information in this article applies to:
  • Microsoft Excel for Windows 95, versions 7.0, 7.0a
  • Microsoft Excel for Windows, versions 5.0, 5.0c
  • Microsoft Excel for NT, version 5.0
  • Microsoft Excel for Macintosh, versions 5.0, 5.0a

SYMPTOMS

When you select a drawing object that has a macro assigned to it, and then you click Assign Macro on the Tools Menu, the resulting Assign Macro dialog box may not show the correct reference to the assigned macro.

CAUSE

This may occur if the sheet containing the drawing object has been copied to a new workbook, and the drawing object in question is on the copied sheet. The default Macro Name/Reference edit box will contain the name of the new workbook followed by an exclamation point and the name of the original macro. The default reference is pointing to the defined name registered in this workbook and not directly to the macro's source location. If you click the Edit button on the Assign Macro dialog box while the default name is referenced, the message "Only Macro Names are Valid" will appear.

WORKAROUND

To see the correct macro reference, follow these steps:

  1. Select the sheet that contains the drawing object.

  2. On the Insert menu, point to Name, and then click Define.

  3. Click the macro name in the Define Name dialog box. The Refers to edit box will show the correct reference.

  4. Click OK to close the Define Name dialog box.

STATUS

Microsoft 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 7.0

For more information about assigning a macro to a control, click Answer Wizard on the Help menu and type:

   how do I assign a macro to a control

Microsoft Press, "Microsoft Excel/Visual Basic Programmer's Guide," version 7.0, Chapter 8, "Controls and Dialog Boxes"

Microsoft Excel 5.0

For more information about assigning a macro to a control in Microsoft Excel version 5.0, click the Search button in Help and type:

   Buttons, Creating

"Visual Basic User's Guide," version 5.0, Chapter 11, "Controls and Dialog Boxes"


Additional query words: 5.00 5.00a 5.00c 7.00
Keywords : xlmac xlnt xlwin kbprg
Version : WINDOWS: 5.0,5.0c,7.0,7.0a; MACINTOSH: 5.0
Platform : MACINTOSH WINDOWS
Issue type : kbbug
Solution Type : kbworkaround


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 2, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.