Name
commandbars
.FindControls([Type
], [Id
], [Tag
], [Visible
])
Synopsis
Returns a collection of command bar controls. The arguments are the same as for the FindControl
method, except there is no Recursive
argument (that argument is assumed to be True). The following code lists the captions and IDs of all of the pop-up menu controls:
Sub FindControlsDemo( ) Dim cbcs As CommandBarControls, cpop As CommandBarPopup ' Get the collection of pop-up menus . Set cbcs = CommandBars.FindControls(msoControlPopup) ' Show the caption and ID of each control. For Each cpop In cbcs Debug.Print cpop.Caption, cpop.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.