Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
ID
Top
Expand Minimize

CommandBarEvents Property

Visual Studio .NET 2003

Returns an object providing events fired when the supplied CommandBarControl object is clicked.

[Visual Basic .NET]
Public ReadOnly Property CommandBarEvents( _
   ByVal CommandBarControl As Object _
) As CommandBarEvents
[Visual Basic 6]
Property Get CommandBarEvents( _
   ByVal CommandBarControl As Object _
) As CommandBarEvents
[C++]
HRESULT __stdcall get_CommandBarEvents(
   IDispatch* CommandBarControl,
   /* [out, retval] */ CommandBarEvents** retVal
);
[C#]
public CommandBarEvents CommandBarEvents(
   object CommandBarControl
) {get;}
[JScript .NET]
public function get CommandBarEvents(
   CommandBarControl : Object
) : CommandBarEvents

Parameters

CommandBarControl
Required. The CommandBar control that causes the event to fire.

Return Value

Returns a CommandBarEvents object.

Remarks

The CommandBarEvents property is used by an Add-in to connect an event with a click of a CommandBarControl object, or to connect to the Click event of any member of the CommandBarControls collection.

The Add-in must set the OnAction property to some string value. It can set this value after the CommandBarEvents property is called, and can reset it to a blank string, which disconnects the event. If an Add-in creates a control and fails to set the OnAction property to some valid string value, then no event is raised on the event object returned by the CommandBarEvents property.

See Also

Applies To: Events Object

Show:
© 2015 Microsoft