1*30cfceefSAndrew Rist' ************************************************************* 2*30cfceefSAndrew Rist' 3*30cfceefSAndrew Rist' Licensed to the Apache Software Foundation (ASF) under one 4*30cfceefSAndrew Rist' or more contributor license agreements. See the NOTICE file 5*30cfceefSAndrew Rist' distributed with this work for additional information 6*30cfceefSAndrew Rist' regarding copyright ownership. The ASF licenses this file 7*30cfceefSAndrew Rist' to you under the Apache License, Version 2.0 (the 8*30cfceefSAndrew Rist' "License")' you may not use this file except in compliance 9*30cfceefSAndrew Rist' with the License. You may obtain a copy of the License at 10*30cfceefSAndrew Rist' 11*30cfceefSAndrew Rist' http://www.apache.org/licenses/LICENSE-2.0 12*30cfceefSAndrew Rist' 13*30cfceefSAndrew Rist' Unless required by applicable law or agreed to in writing, 14*30cfceefSAndrew Rist' software distributed under the License is distributed on an 15*30cfceefSAndrew Rist' "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*30cfceefSAndrew Rist' KIND, either express or implied. See the License for the 17*30cfceefSAndrew Rist' specific language governing permissions and limitations 18*30cfceefSAndrew Rist' under the License. 19*30cfceefSAndrew Rist' 20*30cfceefSAndrew Rist' ************************************************************* 21cdf0e10cSrcweirVERSION 5.00 22cdf0e10cSrcweirBegin {AC0714F6-3D04-11D1-AE7D-00A0C90F26F4} Wizard 23cdf0e10cSrcweir ClientHeight = 7470 24cdf0e10cSrcweir ClientLeft = 1740 25cdf0e10cSrcweir ClientTop = 1545 26cdf0e10cSrcweir ClientWidth = 6585 27cdf0e10cSrcweir _ExtentX = 11615 28cdf0e10cSrcweir _ExtentY = 13176 29cdf0e10cSrcweir _Version = 393216 30cdf0e10cSrcweir DisplayName = "AnalysisWizard" 31cdf0e10cSrcweir AppName = "Visual Basic" 32cdf0e10cSrcweir AppVer = "Visual Basic 6.0" 33cdf0e10cSrcweir LoadName = "Command Line / Startup" 34cdf0e10cSrcweir LoadBehavior = 5 35cdf0e10cSrcweir RegLocation = "HKEY_CURRENT_USER\Software\Microsoft\Visual Basic\6.0" 36cdf0e10cSrcweir CmdLineSupport = -1 'True 37cdf0e10cSrcweirEnd 38cdf0e10cSrcweirAttribute VB_Name = "Wizard" 39cdf0e10cSrcweirAttribute VB_GlobalNameSpace = False 40cdf0e10cSrcweirAttribute VB_Creatable = True 41cdf0e10cSrcweirAttribute VB_PredeclaredId = False 42cdf0e10cSrcweirAttribute VB_Exposed = False 43cdf0e10cSrcweirOption Explicit 44cdf0e10cSrcweir 45cdf0e10cSrcweirDim mcbMenuCommandBar As Office.CommandBarControl 'command bar object 46cdf0e10cSrcweirPublic WithEvents MenuHandler As CommandBarEvents 'command bar event handler 47cdf0e10cSrcweirAttribute MenuHandler.VB_VarHelpID = -1 48cdf0e10cSrcweirDim mfrmWizard As frmWizard 49cdf0e10cSrcweirDim VBInstance As VBIDE.VBE 50cdf0e10cSrcweir 51cdf0e10cSrcweir 52cdf0e10cSrcweir'------------------------------------------------------ 53cdf0e10cSrcweir'this method adds the Add-In to the VB menu 54cdf0e10cSrcweir'it is called by the VB addin manager 55cdf0e10cSrcweir'------------------------------------------------------ 56cdf0e10cSrcweirPrivate Sub AddinInstance_OnConnection(ByVal application As Object, ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, ByVal AddInInst As Object, custom() As Variant) 57cdf0e10cSrcweir On Error GoTo error_handler 58cdf0e10cSrcweir 59cdf0e10cSrcweir Set VBInstance = application 60cdf0e10cSrcweir 61cdf0e10cSrcweir If ConnectMode = ext_cm_External Then 62cdf0e10cSrcweir 'Used by the wizard toolbar to start this wizard 63cdf0e10cSrcweir LoadMe 64cdf0e10cSrcweir Else 65cdf0e10cSrcweir Set mcbMenuCommandBar = AddToAddInCommandBar(VBInstance, LoadResString(15), LoadResPicture(5000, 0)) 66cdf0e10cSrcweir 'sink the event 67cdf0e10cSrcweir Set Me.MenuHandler = VBInstance.Events.CommandBarEvents(mcbMenuCommandBar) 68cdf0e10cSrcweir End If 69cdf0e10cSrcweir 70cdf0e10cSrcweir Exit Sub 71cdf0e10cSrcweir 72cdf0e10cSrcweirerror_handler: 73cdf0e10cSrcweir MsgBox Err.Description 74cdf0e10cSrcweirEnd Sub 75cdf0e10cSrcweir 76cdf0e10cSrcweir'------------------------------------------------------ 77cdf0e10cSrcweir'this method removes the Add-In from the VB menu 78cdf0e10cSrcweir'it is called by the VB addin manager 79cdf0e10cSrcweir'------------------------------------------------------ 80cdf0e10cSrcweirPrivate Sub AddinInstance_OnDisconnection(ByVal RemoveMode As AddInDesignerObjects.ext_DisconnectMode, custom() As Variant) 81cdf0e10cSrcweir 'delete the command bar entry 82cdf0e10cSrcweir mcbMenuCommandBar.Delete 83cdf0e10cSrcweirEnd Sub 84cdf0e10cSrcweir 85cdf0e10cSrcweir'this event fires when the menu is clicked in the IDE 86cdf0e10cSrcweirPrivate Sub MenuHandler_Click(ByVal CommandBarControl As Object, handled As Boolean, CancelDefault As Boolean) 87cdf0e10cSrcweir LoadMe 88cdf0e10cSrcweirEnd Sub 89cdf0e10cSrcweir 90cdf0e10cSrcweirPrivate Sub LoadMe() 91cdf0e10cSrcweir Set mfrmWizard = New frmWizard 92cdf0e10cSrcweir 'pass the vb instance to the wizard module 93cdf0e10cSrcweir Set mfrmWizard.VBInst = VBInstance 94cdf0e10cSrcweir 'load and show the form 95cdf0e10cSrcweir mfrmWizard.Show vbModal 96cdf0e10cSrcweir Set mfrmWizard = Nothing 97cdf0e10cSrcweirEnd Sub 98cdf0e10cSrcweir 99cdf0e10cSrcweir 100