title | ms.service | api_name | ms.assetid | ms.date | ms.localizationpriority | |
---|---|---|---|---|---|---|
Application.CommandBars property (Project) |
project-server |
|
80f57057-9bb3-018b-0e45-fd1423368091 |
06/08/2017 |
medium |
Gets a CommandBars collection that represents all the command bars in the application. Read-only CommandBars.
expression.CommandBars
expression A variable that represents an Application object.
For more information, see the CommandBars collection object in the Microsoft Office Visual Basic Reference.
The following example deletes all custom command bars that aren't visible.
Sub RemoveCommandBars()
Dim Bar As CommandBar
For Each Bar In Application.CommandBars
If Not Bar.BuiltIn And Not Bar.Visible Then Bar.Delete
Next
End Sub
[!includeSupport and feedback]