VERSION 5.00 Begin {AC0714F6-3D04-11D1-AE7D-00A0C90F26F4} dsrProgressBar ClientHeight = 6120 ClientLeft = 0 ClientTop = 0 ClientWidth = 7440 _ExtentX = 13123 _ExtentY = 10795 _Version = 393216 Description = "Adds a form containing a progress bar to the VBA project." DisplayName = "Add Progress Bar Form" 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 = "dsrProgressBar" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = True Attribute VB_PredeclaredId = False Attribute VB_Exposed = True Option Explicit Implements IDTExtensibility2 Private WithEvents p_ctlButtonEvents As Office.CommandBarButton Attribute p_ctlButtonEvents.VB_VarHelpID = -1 Private p_strProgID As String 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 with WithEvents ' in 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 disconnect 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 AddProgressBarToProject Event_End: Exit Sub Event_Err: AddInErr Err Resume Event_End End Sub