I have tested this procedure with the Excel, Expression Web and Word versions listed on my Microsoft VBA page.
All of the code listed here ran by pasting it in to the modules and userforms without modifying it.
The first tool that I use for large VBA projects is a UserForm.
I call it frmProgress. I insert a frame into and call the frame FrameProgress.
The UserForm should have the following code pasted into it.
Private intProcValue As Long
Private strProcName As String
Private intResultsValue As Integer
Public Property Let ProcValue(intReceivedValue2 As String)
intProcValue = intReceivedValue2
End Property
Public Property Let ProcName(strInputProcName As String)
strProcName = strInputProcName
End Property
Public Property Let intResults(intInputVal As Integer)
intResultsValue = intInputVal
End Property
Public Property Get intResults() As Integer
intResults = intResultsValue
End Property
Private Sub UserForm_Activate()
Me.Width = 240
Me.Height = 60
Me.frameProgress.Height = 20
Me.frameProgress.Width = 225
Me.frameProgress.Top = 12
Me.frameProgress.Left = 5
Select Case UCase(strProcName)
Case "PROCESS1"
intResultsValue = Process1(intProcValue)
Me.intResults = intResultsValue
Case "PROCESS2"
intResultsValue = Process2(intProcValue)
Me.intResults = intResultsValue
End Select
End Sub
Click Next to go to the ramaining Progress Meter Code.