Me.Show
Timer1.Interval = 1000
Timer1.Enabled = True
End Sub
Private sub Timer1_Timer()
PauseTime = 5 ' set duration
ProgressBar1.Max = ((PauseTime + 1) * Timer1.Interval)
start = timer ' set start time.
do While timer < start + PauseTime
ProgressBar1.Value = ProgressBar1.Value + 10
DoEvents ' Yield to other processes.
Loop
Finish = timer ' set end time.
TotalTime = Finish - start ' Calculate total time.
MsgBox "Paused for " & TotalTime & " seconds"
Timer1.Enabled = False
End Sub
Return
No comments:
Post a Comment