Skip to content

Latest commit

 

History

History
45 lines (27 loc) · 995 Bytes

Project.Application.CommandBars.md

File metadata and controls

45 lines (27 loc) · 995 Bytes
title ms.service api_name ms.assetid ms.date ms.localizationpriority
Application.CommandBars property (Project)
project-server
Project.Application.CommandBars
80f57057-9bb3-018b-0e45-fd1423368091
06/08/2017
medium

Application.CommandBars property (Project)

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

Syntax

expression.CommandBars

expression A variable that represents an Application object.

Remarks

For more information, see the CommandBars collection object in the Microsoft Office Visual Basic Reference.

Example

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]