VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "CONNECTOR"
Attribute VB_Creatable = True
Attribute VB_Exposed = True
Attribute VB_Description = "AddIn Example 3"
' This class connects the add-in to the VB menu.
'
Dim NewMenu As VBIDE.SubMenu
Dim MenuLines As VBIDE.MenuLine
Dim MenuLines2 As VBIDE.MenuLine
Dim clickHandler As AddInClass
Dim clickHandler2 As AddInClass2
Dim ConnectID As Long
Dim ConnectID2 As Long
Dim thisInstance As VBIDE.Application

Sub ConnectAddIn(VBInstance As VBIDE.Application)

    Set thisInstance = VBInstance

    Set clickHandler = New AddInClass
    Set clickHandler2 = New AddInClass2

    Set NewMenu = thisInstance.AddInMenu.MenuItems.AddMenu("&New Menu")
    Set MenuLines = NewMenu.MenuItems.Add("&First Option")
    Set MenuLines2 = NewMenu.MenuItems.Add("&Second Option")
    ConnectID = MenuLines.ConnectEvents(clickHandler)
    ConnectID2 = MenuLines2.ConnectEvents(clickHandler2)
End Sub

Sub DisconnectAddIn(Mode As Integer)
    MenuLines.DisconnectEvents ConnectID
    MenuLines2.DisconnectEvents ConnectID2
    NewMenu.MenuItems.Remove MenuLines
    NewMenu.MenuItems.Remove MenuLines2
    thisInstance.AddInMenu.MenuItems.Remove NewMenu
End Sub

