Excel Err Msg: Macro Error at Cell <cell_ref> with ADD.COMMAND

Last reviewed: November 29, 1994
Article ID: Q93577
The information in this article applies to:
  • Microsoft Excel for Windows, version 4.0.

SUMMARY

In version 4.0 of Microsoft Excel for Windows, you may receive a macro error if you use the ADD.COMMAND() function to restore the Save As command to the File menu after removing it with the DELETE.COMMAND() function.

This problem occurs if the command_ref argument of the ADD.COMMAND() function is entered as "Save As...". If you specify the command_ref argument as "Save As", omitting the three periods, the ADD.COMMAND() function adds the Save As command to the File menu without error.

For example, use the following line in your macro to restore the Save As Command to the File menu

   =ADD.COMMAND(<bar_num>,"File","Save As",7)

where <bar_num> is the number representing the menu bar from which you removed the Save As command.

REFERENCES

"Microsoft Excel User's Guide 2," version 4.0, pages 282-285 "Microsoft Excel Function Reference," version 4.0, pages 8-9, 104-105


KBCategory: kberrmsg
KBSubcategory:

Additional reference words: 4.00


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: November 29, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.