SUMMARY
The macro function ADD.COMMAND can be used in Microsoft Excel version
3.00 to replace built-in menu items that were removed with
DELETE.COMMAND. However, the following conditions must be met for
ADD.COMMAND to function properly:
- DELETE.COMMAND must have been used to delete the menu item.
- The command that was deleted can be added back only to the same
menu on the same bar. ADD.COMMAND cannot be used to change which
menu a command is located on, but it can be used to change the
position of the command (on the same menu).
- Either the name of the command (as a text string) or the unique ID
number (returned by DELETE.COMMAND) must be used to restore the
menu item. For example, to add the Quit command the the File menu
on menu bar 1 (Full Menus), the following command is used:
=ADD.COMMAND(1,"File","Quit",23)
The number 1 specifies the bar number, "File" is the name (as a
text string) of the menu, "Quit" is the name of the command, and 23
tells Excel to place the command in the 23rd position on the menu
(position is optional).
For more information on ADD.COMMAND, see pages 5-6 of the "Microsoft
Excel Function Reference" version 3.0 manual.
For more information on DELETE.COMMAND, see pages 51-52 of the
"Microsoft Excel Function Reference" version 3.0 manual.
|