Coninuously Running Time in Cell

  • Thread starter Thread starter Randy
  • Start date Start date
R

Randy

Is there a way of having today's time continuously running within a cell and
use it to "count down" the time remaining in other cells?

Thanks for your help!!

Randy
 
Hi,

To get a running clock insert the code below in a general module. Run the
sub StartClock to strat the clock running and StopClock to stop it

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
 
Thanks Mike!

Would that be a VB module? If yes, all code below goes into one module?

Thanks again!
 
ALT+F11 to open vb editor, right click 'Thisworkbook' and insert module, the
code goes in there.

Mike
 
Perfect Mike....Thank You!

While I have your attention can you tell me how I can update workbook
information with have to close it and then re-open it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top