Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Is there a formula for a timer

Is there a formula for a xcell that will count current time, IE display as a
clock or timer?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Is there a formula for a timer

Hi,

If you mean an updating digital clock then the answers no, you have to make
your own.

Alt+F11 to open VB editor. Right click 'This Workbook' and insert module and
paste the code below in. Run the 'StartClock module and you get your clock in
Sheet 1 - A1. Stop it manually when exiting Excel or better still put the
StopClock sub in the before close event.

Dim Go As Boolean
Sub StartClock()
Go = True
MyClock
End Sub

Sub MyClock()
If Go Then
Worksheets("Sheet1").Cells(1, 1).Value = Format(Now, "hh:mm:ss")
Application.OnTime (Now + TimeSerial(0, 0, 1)), "MyClock"
End If
End Sub

Sub StopClock()
Go = False
End Sub

Mike

"1965cs" wrote:

Is there a formula for a xcell that will count current time, IE display as a
clock or timer?

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 Steve[_9_] Excel Discussion (Misc queries) 4 January 28th 08 08:10 PM
Timer Brandon H Excel Discussion (Misc queries) 5 August 9th 07 01:54 PM
Timer Vijay Excel Worksheet Functions 1 April 6th 07 11:00 AM
Lap-timer kabildgaard Excel Discussion (Misc queries) 0 August 11th 06 03:26 PM
Stopping a Timer / Running a timer simultaneously on Excel Paul23 Excel Discussion (Misc queries) 1 March 10th 06 12:08 PM


All times are GMT +1. The time now is 08:21 PM.

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

About Us

"It's about Microsoft Excel"