Remove Menus from the Menu Bar
 
 
 

To remove a menu from the menu bar, use the RemoveMenuFromMenuBar or the RemoveFromMenuBar method. Both methods accomplish the same goal—they remove a menu from the menu bar.

The difference between the two methods is the object from which they are called. The RemoveMenuFromMenuBar method is called from the PopupMenus collection. This method requires as input the name of the menu to remove, or the location on the menu bar of the menu to remove. For example, the following statement removes the menu added in Insert a menu in the menu bar:

currMenuGroup.Menus.RemoveMenuFromMenuBar ("TestMenu")

The RemoveFromMenuBar method is called directly from the PopupMenu object to be removed. This method does not require any input. The name of the menu is not needed because you are calling the method directly from the object to be removed.

You should use whichever method is more convenient for your application.

NoteMenus that have been removed from the menu bar are still available in their designated menu group. They are simply no longer visible to the user.