When my users press a button on a form, it starts a process that takes awhile to complete. I need something like a thermometer to show progress on this process.
As my first step, I have created some sample code that displays progess as a percentage. UNFORTUNATELY, it does not work. The textbox remains empty until the very end of the process, and then it displays "100% complete".
Please advise me on this issue.
__________________
Private Sub Command0_Click()
MsgBox "starting test"
Dim a As Long
Dim b As Long
a = 0
b = 0
Do While a < 100000000
If a Mod 1000000 = 0 Then
b = b + 1
myTextBox.value = b & "% complete"
Me.Refresh
End If
a = a + 1
Loop
MsgBox "all done"
End Sub
As my first step, I have created some sample code that displays progess as a percentage. UNFORTUNATELY, it does not work. The textbox remains empty until the very end of the process, and then it displays "100% complete".
Please advise me on this issue.
__________________
Private Sub Command0_Click()
MsgBox "starting test"
Dim a As Long
Dim b As Long
a = 0
b = 0
Do While a < 100000000
If a Mod 1000000 = 0 Then
b = b + 1
myTextBox.value = b & "% complete"
Me.Refresh
End If
a = a + 1
Loop
MsgBox "all done"
End Sub