473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Showing countdown timer on a form

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
1 29502
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Bonnett | last post by:
I have been creating a generic countdown timer (source code below), counting the seconds, minutes, hours and days till an event, but I have having trouble with it finding out how many hours are...
4
by: Christine | last post by:
I've implemented a countdown timer for a tutorial web page that should give the user 45 minutes to complete the test, only to find that the timer is slowly 'losing' time. On average, it actually...
8
by: Michael | last post by:
I have this script that works the way I want except for one thing... Once it hits zero it starts to count up and looks like this: -1:0-1:0-1:0-18 with the last number counting up. Can anyone...
2
by: John Devlon | last post by:
Hi everyone.... I'm trying to make something work... When I launch a new form, the application has to quit after a few seconds... I searched the net for some hours and I can't find any...
1
by: Yannick Benoit | last post by:
Hi everyone. I want to create a script which post a form with fields to fill in but with a timer so that if the person fills the form in 10 seconds he gets a specific score but if its in 20 then...
3
by: JimJam | last post by:
Hello Peeps I have created a program in VB.NET 2003 that counts down from 7.5 hours to zero from 08:00. I have a button that starts a new countdown from 1 hour to zero whilst the first one is...
1
by: DennyLoi | last post by:
Hi everyone. I am trying to implement a countdown timer which is displayed on my page. The counter needs to countdown from 10 seconds to 0 upon the page loading up. I tried the following, but...
5
mageswar005
by: mageswar005 | last post by:
hi, I need a javascript countdown timer to my website, I have already the countdown timer but its have some problem. Note: 1) If i choose the tools/internet option in my browser means , at...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.