1*cdf0e10cSrcweirVERSION 5.00
2*cdf0e10cSrcweirBegin {AC0714F6-3D04-11D1-AE7D-00A0C90F26F4} Wizard
3*cdf0e10cSrcweir   ClientHeight    =   7470
4*cdf0e10cSrcweir   ClientLeft      =   1740
5*cdf0e10cSrcweir   ClientTop       =   1545
6*cdf0e10cSrcweir   ClientWidth     =   6585
7*cdf0e10cSrcweir   _ExtentX        =   11615
8*cdf0e10cSrcweir   _ExtentY        =   13176
9*cdf0e10cSrcweir   _Version        =   393216
10*cdf0e10cSrcweir   DisplayName     =   "AnalysisWizard"
11*cdf0e10cSrcweir   AppName         =   "Visual Basic"
12*cdf0e10cSrcweir   AppVer          =   "Visual Basic 6.0"
13*cdf0e10cSrcweir   LoadName        =   "Command Line / Startup"
14*cdf0e10cSrcweir   LoadBehavior    =   5
15*cdf0e10cSrcweir   RegLocation     =   "HKEY_CURRENT_USER\Software\Microsoft\Visual Basic\6.0"
16*cdf0e10cSrcweir   CmdLineSupport  =   -1  'True
17*cdf0e10cSrcweirEnd
18*cdf0e10cSrcweirAttribute VB_Name = "Wizard"
19*cdf0e10cSrcweirAttribute VB_GlobalNameSpace = False
20*cdf0e10cSrcweirAttribute VB_Creatable = True
21*cdf0e10cSrcweirAttribute VB_PredeclaredId = False
22*cdf0e10cSrcweirAttribute VB_Exposed = False
23*cdf0e10cSrcweirOption Explicit
24*cdf0e10cSrcweir
25*cdf0e10cSrcweirDim mcbMenuCommandBar         As Office.CommandBarControl  'command bar object
26*cdf0e10cSrcweirPublic WithEvents MenuHandler As CommandBarEvents          'command bar event handler
27*cdf0e10cSrcweirAttribute MenuHandler.VB_VarHelpID = -1
28*cdf0e10cSrcweirDim mfrmWizard As frmWizard
29*cdf0e10cSrcweirDim VBInstance As VBIDE.VBE
30*cdf0e10cSrcweir
31*cdf0e10cSrcweir
32*cdf0e10cSrcweir'------------------------------------------------------
33*cdf0e10cSrcweir'this method adds the Add-In to the VB menu
34*cdf0e10cSrcweir'it is called by the VB addin manager
35*cdf0e10cSrcweir'------------------------------------------------------
36*cdf0e10cSrcweirPrivate Sub AddinInstance_OnConnection(ByVal application As Object, ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, ByVal AddInInst As Object, custom() As Variant)
37*cdf0e10cSrcweir   On Error GoTo error_handler
38*cdf0e10cSrcweir
39*cdf0e10cSrcweir   Set VBInstance = application
40*cdf0e10cSrcweir
41*cdf0e10cSrcweir   If ConnectMode = ext_cm_External Then
42*cdf0e10cSrcweir       'Used by the wizard toolbar to start this wizard
43*cdf0e10cSrcweir       LoadMe
44*cdf0e10cSrcweir   Else
45*cdf0e10cSrcweir       Set mcbMenuCommandBar = AddToAddInCommandBar(VBInstance, LoadResString(15), LoadResPicture(5000, 0))
46*cdf0e10cSrcweir       'sink the event
47*cdf0e10cSrcweir       Set Me.MenuHandler = VBInstance.Events.CommandBarEvents(mcbMenuCommandBar)
48*cdf0e10cSrcweir   End If
49*cdf0e10cSrcweir
50*cdf0e10cSrcweir   Exit Sub
51*cdf0e10cSrcweir
52*cdf0e10cSrcweirerror_handler:
53*cdf0e10cSrcweir   MsgBox Err.Description
54*cdf0e10cSrcweirEnd Sub
55*cdf0e10cSrcweir
56*cdf0e10cSrcweir'------------------------------------------------------
57*cdf0e10cSrcweir'this method removes the Add-In from the VB menu
58*cdf0e10cSrcweir'it is called by the VB addin manager
59*cdf0e10cSrcweir'------------------------------------------------------
60*cdf0e10cSrcweirPrivate Sub AddinInstance_OnDisconnection(ByVal RemoveMode As AddInDesignerObjects.ext_DisconnectMode, custom() As Variant)
61*cdf0e10cSrcweir    'delete the command bar entry
62*cdf0e10cSrcweir    mcbMenuCommandBar.Delete
63*cdf0e10cSrcweirEnd Sub
64*cdf0e10cSrcweir
65*cdf0e10cSrcweir'this event fires when the menu is clicked in the IDE
66*cdf0e10cSrcweirPrivate Sub MenuHandler_Click(ByVal CommandBarControl As Object, handled As Boolean, CancelDefault As Boolean)
67*cdf0e10cSrcweir    LoadMe
68*cdf0e10cSrcweirEnd Sub
69*cdf0e10cSrcweir
70*cdf0e10cSrcweirPrivate Sub LoadMe()
71*cdf0e10cSrcweir    Set mfrmWizard = New frmWizard
72*cdf0e10cSrcweir    'pass the vb instance to the wizard module
73*cdf0e10cSrcweir    Set mfrmWizard.VBInst = VBInstance
74*cdf0e10cSrcweir    'load and show the form
75*cdf0e10cSrcweir    mfrmWizard.Show vbModal
76*cdf0e10cSrcweir    Set mfrmWizard = Nothing
77*cdf0e10cSrcweirEnd Sub
78*cdf0e10cSrcweir
79*cdf0e10cSrcweir
80