From my file (see below my Sig) ------
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com www.pcdatasheet.com
Countdown Timer On A Form
Q I would like to have a form that once opened would start to countdown for
lets say 30 seconds. Once it reaches 0, some event will occur. I would like
the numbers to change every second so that the user knows how long before
the event occurs. Any ideas on how to do this.
A Add the following code to the form:
Put this statement in the Options Explicit header:
Dim mintTimer As Integer
Private Sub Form_Load()
mintTimer = 30 ' 30 seconds
txtShowTimer.Value = mintTimerStart ' show the time in a textbox
TimerInterval = 1000 ' 1 second
End Sub
Private Sub Timer()
mintTimer = mintTimer - 1 ' count down
txtShowTimer.Value = mintTimerStart ' show the time in a textbox
If mintTimer = 0 Then
'do your event.
TimerInterval = 0 ' Stop the timer
End If
End Sub
"Will" <Wi****************@hotmail.com> wrote in message
news:3a*************@individual.net...
I have form showing instructions and logging actions and I would like the
form to show a count down timer for a certain period of time. E.g. 30
secs, going down to 0 and then displaying the action. I want the user to be
able to see the seconds counting down. Can anyone help me?
thanks