Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using a timer


I need to create a timer that counts off seconds on my form. For
example, I need to click on button 1 and testbox 1 starts counting off
1, 2, 3, etc.... and the timer stops when i click button 2, leaving the
final time count in testbox 1.

How can I do this?


--
Tha BeatMaker
------------------------------------------------------------------------
Tha BeatMaker's Profile: http://www.excelforum.com/member.php...o&userid=23998
View this thread: http://www.excelforum.com/showthread...hreadid=392692

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Using a timer

Hi Beatmaker,

I don't know if you need help with the triggering itself, but take a
look at this timer code. This example puts the timer in the status bar
rather than on a form. If you want to be able to do something else
while it runs, you can uncomment the DoEvents.

Sub timer_example()


timeout_limit = 10
start_time = Time()

Do While time_difference < timeout_limit
Application.StatusBar = time_difference & " seconds elapsed out
of " & timeout_limit
'DoEvents
current_time = Time()
time_difference = DateDiff("s", start_time, current_time)
Loop

End Sub

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Using a timer

Beatmaker,

I gave an example back in May. Find it here http://tinyurl.com/crtl3



--

HTH

RP
(remove nothere from the email address if mailing direct)


"KCarhart" wrote in message
ps.com...
Hi Beatmaker,

I don't know if you need help with the triggering itself, but take a
look at this timer code. This example puts the timer in the status bar
rather than on a form. If you want to be able to do something else
while it runs, you can uncomment the DoEvents.

Sub timer_example()


timeout_limit = 10
start_time = Time()

Do While time_difference < timeout_limit
Application.StatusBar = time_difference & " seconds elapsed out
of " & timeout_limit
'DoEvents
current_time = Time()
time_difference = DateDiff("s", start_time, current_time)
Loop

End Sub



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default Using a timer

There's a timer control here too:

http://www.enhanceddatasystems.com/E...ExcelTimer.htm

Robin Hammond
www.enhanceddatasystems.com

--
Robin Hammond
www.enhanceddatasystems.com
"Bob Phillips" wrote in message
...
Beatmaker,

I gave an example back in May. Find it here http://tinyurl.com/crtl3



--

HTH

RP
(remove nothere from the email address if mailing direct)


"KCarhart" wrote in message
ps.com...
Hi Beatmaker,

I don't know if you need help with the triggering itself, but take a
look at this timer code. This example puts the timer in the status bar
rather than on a form. If you want to be able to do something else
while it runs, you can uncomment the DoEvents.

Sub timer_example()


timeout_limit = 10
start_time = Time()

Do While time_difference < timeout_limit
Application.StatusBar = time_difference & " seconds elapsed out
of " & timeout_limit
'DoEvents
current_time = Time()
time_difference = DateDiff("s", start_time, current_time)
Loop

End Sub





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
TIMER Jase Excel Discussion (Misc queries) 1 September 8th 08 10:22 PM
timer Steve[_9_] Excel Discussion (Misc queries) 4 January 28th 08 08:10 PM
Stopping a Timer / Running a timer simultaneously on Excel Paul23 Excel Discussion (Misc queries) 1 March 10th 06 12:08 PM
timer Mike Macgowan Excel Programming 4 May 24th 05 03:27 AM
Timer Phil Excel Programming 4 February 6th 04 01:58 PM


All times are GMT +1. The time now is 06:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"