Tobias said:
I created a com add in now I have a problem :
How can I exactly define what commandBarButtons do??
How can I use them??
Hi Tobias,
in order to react to clicks on a commandbar button you have to declare
a variable which will points to that button:
[private|public] WithEvents btCreateDocument As CommandBarButton
In addition, you must define an event handler:
Private Sub btCreateDocument_Click(ByVal Ctrl As CommandBarButton, _
ByRef CancelDefault As Boolean) _
Handles btCreateDocument.Click
' Insert her the code to be executed when the user has
' clicked on the button
End Sub
Don't forget to assign your button variable a value after
you have added your button to a commandbar.
btCreateDocument = ActiveCommandbar.Controls.Add....
Kind regards
Bernd