Command BarButton Methods

Name Returns Parameters Description

Copy

CommandBar Control

Bar, Before

Copies a CommandBarButton to an existing command bar.

CopyFace

Copies the face of a CommandBar Button to the Clipboard.

Delete

Temporary

Deletes the specified CommandBar Button from its collection. Set Temporary to True to delete the control for the current session only — the application will display the control again in the next session.

Execute

Runs the procedure or built-in command assigned to the specified CommandBarButton. For custom controls, use the OnAction property to specify the procedure to be run.

Move

CommandBar Control

Bar, Before

Moves the specified CommandBar Button to an existing command bar.

PasteFace

Pastes the contents of the Clipboard onto a CommandBarButton.

Name Returns

Parameters

Description

Reset

Resets a built-in CommandBarButton to its default configuration, or resets a built-in CommandBarButton to its original function and face.

SetFocus

Moves the keyboard focus to the specified CommandBarButton. If the control is disabled or isn't visible, this method will fail.

CommandBarButton Events

Name Parameters

Description

Click ByVal Ctrl Triggered when a user clicks a CommandBarButton. Ctrl

As CommandBar denotes the control that initiated the event. CancelDefault

Button, Cancel is False if the default behavior associated with the

Default As CommandBarButton control occurs, unless cancelled by

Boolean another process or Add-In.

0 0

Post a comment