#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 62
Default My clock

Hi,

I put the below formula in the cell A1, i need to refresh it every one
second so that it might look like a clock, can anybody help?

=NOW()
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default My clock

Hi,

Alt+F11 to open vb editor, right click 'ThisWorkbook' and insert module and
paste the code below in. Run the sub StartClock to start it and always
rememeber to stop it when exiting the workbook by running StopClock

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

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

Sub StopClock()
Go = False
End Sub

Mike


"Pietro" wrote:

Hi,

I put the below formula in the cell A1, i need to refresh it every one
second so that it might look like a clock, can anybody help?

=NOW()

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
Incremental time values based upon clock in and clock out times saltnsnails Excel Discussion (Misc queries) 8 January 13th 09 08:11 PM
How do I calculate time in excel (clock in and clock out chad Excel Discussion (Misc queries) 3 January 7th 08 10:09 PM
Change EXCEL Clock to Standard Clock or Military Time YoMarie Excel Worksheet Functions 4 April 29th 07 08:39 PM
Start Clock/Stop Clock abfabrob Excel Discussion (Misc queries) 9 June 28th 05 04:26 PM
Clock Marcel Excel Discussion (Misc queries) 2 April 4th 05 09:45 PM


All times are GMT +1. The time now is 04:56 AM.

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"