Name

commandbar.Id

Synopsis

Returns a numeric identifier for the command bar. The following code lists the names and IDs of all the command bars:

Sub ListCommandBars( )
    Dim cb As CommandBar
    For Each cb In CommandBars
        Debug.Print cb.Name, cb.id
    Next
End Sub

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.