G
Guest
I am using the following code to genereate messages and control the progress
bar. My Question is, how do I fit this around my code so that the code I want
to run runs, and that the progress bar is also run.
Sub ProgressBarAdvancedDemo()
Dim sb As clsProgressBar, i As Long
Set sb = New clsProgressBar
sb.Show "Please wait", "Initializing...", 0
For i = 0 To 30 Step 5
sb.PercentComplete = i
WaitSeconds 1
Next i
sb.PreMessageFG_RGB = RGB(255, 255, 255)
For i = 35 To 70 Step 5
sb.PercentComplete = i
WaitSeconds 1
Next i
sb.ProgressBarFG_RGB = RGB(255, 0, 0)
sb.PreMessage = "Still doing nothing much"
For i = 75 To 90 Step 5
sb.PercentComplete = i
WaitSeconds 1
Next i
sb.PostMessage = "Almost there!"
For i = 95 To 100 Step 5
sb.PercentComplete = i
WaitSeconds 1
Next i
Set sb = Nothing
End Sub
bar. My Question is, how do I fit this around my code so that the code I want
to run runs, and that the progress bar is also run.
Sub ProgressBarAdvancedDemo()
Dim sb As clsProgressBar, i As Long
Set sb = New clsProgressBar
sb.Show "Please wait", "Initializing...", 0
For i = 0 To 30 Step 5
sb.PercentComplete = i
WaitSeconds 1
Next i
sb.PreMessageFG_RGB = RGB(255, 255, 255)
For i = 35 To 70 Step 5
sb.PercentComplete = i
WaitSeconds 1
Next i
sb.ProgressBarFG_RGB = RGB(255, 0, 0)
sb.PreMessage = "Still doing nothing much"
For i = 75 To 90 Step 5
sb.PercentComplete = i
WaitSeconds 1
Next i
sb.PostMessage = "Almost there!"
For i = 95 To 100 Step 5
sb.PercentComplete = i
WaitSeconds 1
Next i
Set sb = Nothing
End Sub