Description
A collection of all the ToolbarButton objects on the specified toolbar. Each ToolbarButton object represents a button or a gap (an extended space between buttons) on a toolbar. Do not confuse the ToolbarButton object with the Button object, which is a custom button graphic object on a chart sheet, dialog sheet, or worksheet.
Accessors
Use the ToolbarButtons method with an argument to access a single member of the collection or without an argument to access the entire collection at once. The following example sets the cButtons variable to the number of toolbar buttons and gaps on the Standard toolbar.
cButtons = Toolbars("standard").ToolbarButtons.Count
Use the Add method to add a toolbar button to a toolbar. The following example adds the Insert Module button to the end of the Standard toolbar.
Toolbars("standard").ToolbarButtons.Add button:=190
For a complete list of available toolbar buttons, see "Toolbar Button ID Values" in online Help.
To add a gap instead of a button, omit the button argument for the Add method.
Properties
Application Property, Count Property, Creator Property, Parent Property.
Methods
Add Method (ToolbarButtons Collection), Item Method.