Add Method (CommandBarControls Collection)

Object: CommandBarControls Collection

Adds a commandbar control object to the collection.

Usage

CommandBarControls.Add (ByVal Type As Variant,
ByVal Id As Variant,
ByVal Parameter As Variant,
ByVal Before As Variant) As CommandBarControl

Arguments

Type

The control type (CmdControlType) of the commandbar control.

Id

(Optional) The ID of the command associated with the commandbar control. Omitted the parameter will have the commandbar server assign an ID for the control.

Parameter

(Optional) Reserved for future use.

Before

The position before which the new control is added.

Return Values

CommandBarControl. The object (CommandBarControl) to add to the collection.