AddToAddInToolbar Method Example

This example uses the AddToAddInToolbar method to add a button to the Add-In toolbar for a fictitious add-in called MyAdd.Dll. Setting ForceAddInToolbar to True ensures that the Add-In toolbar is loaded the next time Visual Basic is started.

You could modify the following in a small Visual Basic application to serve as a Setup for your add-in.

Sub Main()
 dim x as Object
 Set x=CreateObject("AddInToolbar.Manager")
 x.AddToAddInToolbar sFileName:="C:\VB5\MyAdd.DLL", _
  sProgID:="MyAddIn.Connect", _
  sAddInName:="MyAddIn Title", _
  ShowOnToolBar:=True, _
  ForceAddInToolbar:=True
End Sub