Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 213
Default Coninuously Running Time in Cell

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Coninuously Running Time in Cell

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


"Randy" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 213
Default Coninuously Running Time in Cell

Thanks Mike!

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

Thanks again!

"Mike H" wrote:

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


"Randy" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Coninuously Running Time in Cell

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

Mike

"Randy" wrote:

Thanks Mike!

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

Thanks again!

"Mike H" wrote:

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


"Randy" wrote:

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

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 213
Default Coninuously Running Time in Cell

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?

"Mike H" wrote:

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

Mike

"Randy" wrote:

Thanks Mike!

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

Thanks again!

"Mike H" wrote:

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


"Randy" wrote:

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

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
Running Time Dimitri Excel Discussion (Misc queries) 5 March 31st 08 03:16 PM
running macros at a set time Monica Excel Discussion (Misc queries) 1 December 12th 06 11:03 PM
Running/Current time in cell? SRS New Users to Excel 6 September 28th 05 09:45 PM
Running a macro at a specified time The Bobka Excel Discussion (Misc queries) 1 June 30th 05 05:25 PM
Running a macro at a certain time Tam Excel Discussion (Misc queries) 3 March 2nd 05 02:50 PM


All times are GMT +1. The time now is 03:06 AM.

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"