CommandBarButton.Execute Method
Office Developer Reference |
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." |
Runs the procedure or built-in command assigned to the specified CommandBarButton control.
Syntax
expression.Execute
expression Required. A variable that represents a CommandBarButton object.
Example
This Microsoft Excel example creates a command bar and then adds a built-in command bar button control to it. The button executes the Excel AutoSum function. This example uses the Execute method to total the selected range of cells when the command bar appears.
Visual Basic for Applications |
---|
|
See Also