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

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.