Causes a Click Event to occur when a control on the command bar is clicked.
Public Class CommandBarEvents
The CommandBarEvents object is returned by the CommandBarEvents Property of the Events Object. The object that is returned has one event in its interface, the Click event. In Visual Basic, you can handle this event using the WithEvents object declaration.
<System.ContextStaticAttribute()> Public WithEvents CommandBarEvents As EnvDTE.CommandBarEvents Public Sub CommandBarEvents_Click(ByVal CommandBarControl As Object, ByRef handled As Boolean, ByRef CancelDefault As Boolean) Handles CommandBarEvents.Click MsgBox("test") End Sub