Showing progress in a code module sub

wdegler

Active Member
Licensed User
Longtime User
I have a sub in a code module which needs to show progress when executing. It is not practical to put the sub into the Activity module (which is bloated already). How can I have a progress bar updating as a loop in the code module sub iterates? A trivial example follows:

'The Activity module:

Sub Process_Globals
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
'do things here
Module1.ALongOne
'and here
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub

'The Code module (Module1):

Sub Process_Globals
End Sub
Sub ALongOne
Dim I As Int

For I=1 To 100000
'do things here, like updating a progress bar in each iteration
Next
End Sub

How can I make a progress bar work for a sub in a code module?
 
Top