Project.CommandBars Property (Project)

Gets a CommandBars collection that represents all the command bars in the project. Read-only CommandBars.

Syntax

expression. CommandBars

expression A variable that represents a Project object.

Remarks

For more information, see the CommandBars object in the Office Developer Reference.

Example

The following example lists all command bars in the project that are not currently visible.

Sub ListCommandBars() 
    Dim Bar As CommandBar 
     
    For Each Bar In ActiveProject.CommandBars 
        If Not Bar.Visible Then Debug.Print Bar.Name 
    Next 
End Sub