CommandBars Articles and Tutorials

Hiding the ActiveMenuBar (Menu at the Top)

Author: Mike Palmatier
Platform: Visual Basic 6.0

The ActiveMenuBar is the only CommandBar that is displayed by default, even if no items are added. There might be times when only toolbars are needed, in these cases the ActiveMenuBar can be hidden. The CommandBars contains a separate property to gain easy access to the ActiveMenuBar. The property is CommandBars.ActiveMenuBar and it can be used to access and modify the ActiveMenuBar. To hide the ActiveMenuBar you simply set the Visible property to False.

Active Menu Bar

The code below will hide the ActiveMenuBar.

CommandBars.ActiveMenuBar.Visible = False
'OR
CommandBars(1).Visible = False