Microsoft KB Archive/30585

{| = Excel: ADD.BAR Returns Error When the Bar Limit Is Exceeded =
 * width="100%"|

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.
 * }