CommandBarButton.Id Property
Office Developer Reference |
Gets the ID for a built-in CommandBarButton control. Read-only.
Note |
---|
The use of CommandBars in some Microsoft Office applications has been superseded by the new Ribbon user interface. For more information, search help for the keyword "Ribbon." |
Syntax
expression.Id
expression Required. A variable that represents a CommandBarButton object.
Remarks
A control's ID determines the built-in action for that control. The value of the Id property for all custom controls is 1.
Example
This example changes the button face of the first control on the command bar named "Custom2" if the button's ID value is less than 25.
Visual Basic for Applications |
---|
|
The following example changes the caption of every control on the toolbar named "Standard" to the current value of the Id property for that control.
Visual Basic for Applications |
---|
|
See Also