VERSION 5.00
Begin {AC0714F6-3D04-11D1-AE7D-00A0C90F26F4} dsrCallTree 
   ClientHeight    =   6360
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   8610
   _ExtentX        =   15187
   _ExtentY        =   11218
   _Version        =   393216
   Description     =   "Exports code to Code Librarian database."
   DisplayName     =   "Call Tree Plus"
   AppName         =   "Visual Basic for Applications IDE"
   AppVer          =   "6.0"
   LoadName        =   "Startup"
   LoadBehavior    =   1
   RegLocation     =   "HKEY_CURRENT_USER\Software\Microsoft\VBA\VBE\6.0"
End
Attribute VB_Name = "dsrCallTree"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit

Implements IDTExtensibility2

Private p_frmCallTree                    As frmCallTree
Private WithEvents p_ctlButtonEvents     As Office.CommandBarButton
Attribute p_ctlButtonEvents.VB_VarHelpID = -1

Private p_strProgID As String

Private Sub AddinInstance_Initialize()
    Set p_frmCallTree = New frmCallTree
    
    ' Set ProgID property for class.
    Me.ProgID = "CallTree.dsrCallTree"
End Sub

Private Sub AddinInstance_Terminate()
    Unload p_frmCallTree
    Set p_frmCallTree = Nothing
End Sub

Private Sub IDTExtensibility2_OnConnection(ByVal Application As Object, _
    ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, _
    ByVal AddInInst As Object, _
    custom() As Variant)
    ' Call shared code to create new command bar button
    ' and return reference to it. Assign reference to
    ' event-ready CommandBarButton object declared by using the
    ' WithEvents keyword in the Declarations section of this module.
    
    Set p_ctlButtonEvents = CreateAddInCommandBarButton(Application, _
        ConnectMode, AddInInst)
        
    ' Set ProgID property for class.
    Me.ProgID = AddInInst.ProgID
End Sub

Private Sub IDTExtensibility2_OnDisconnection(ByVal RemoveMode _
    As AddInDesignerObjects.ext_DisconnectMode, _
    custom() As Variant)
    ' Call common procedure to unload add-in.
    RemoveAddInCommandBarButton RemoveMode
End Sub

Private Sub IDTExtensibility2_OnStartupComplete(custom() As Variant)
'
End Sub

Private Sub IDTExtensibility2_OnAddInsUpdate(custom() As Variant)
'
End Sub

Private Sub IDTExtensibility2_OnBeginShutdown(custom() As Variant)
'
End Sub

Public Property Let ProgID(strProgID As String)
    ' Write-once property is set from OnConnection event.
    If Len(p_strProgID) = 0 Then
        p_strProgID = strProgID
    End If
End Property

Public Property Get ProgID() As String
    ProgID = p_strProgID
End Property

Private Sub p_ctlButtonEvents_Click(ByVal Ctrl As Office.CommandBarButton, _
    CancelDefault As Boolean)
    ' Call initialization code to make sure that VBA projects
    ' are saved and renamed from the default.
    
    On Error GoTo Event_Err
    ' Show form.
    p_frmCallTree.Show
    
Event_End:
    Exit Sub
    
Event_Err:
    AddInErr Err
    Resume Event_End
End Sub


