Excel: ADD.BAR() Returns Error When the Bar Limit Is Exceeded

Last reviewed: October 31, 1994
Article ID: Q30585

SUMMARY

The maximum number of user-defined menu bars that can be added when using the ADD.BAR() macro function is 15. If a macro error occurs after the step that adds a menu bar, the maximum limit of 15 menu bars has probably been exceeded.

Excel will not delete any menu bars created with ADD.BAR(). Therefore, if a macro that adds a menu bar is run repeatedly, the same bar will be added multiple times without ever being deleted. To delete a custom menu, use the DELETE.BAR() command.

The first menu-bar number that is returned from the ADD.BAR() command is 7. The first six are reserved by Excel for the standard menu bar numbers.


KBCategory: kbother
KBSubcategory:

Additional reference words: 1.50 2.20 3.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: October 31, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.