By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,110 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

Showing countdown timer on a form

P: n/a
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
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.