#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Atreides
 
Posts: n/a
Default The NOW function

Usually the NOW function does not update until you save or re-open the file
or press calculate (F9).

However I somehow managed to get it to update constantly (so I could have a
countdown clock running). Does anyone know how to do this?

Thanks
Atreides
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Anne Troy
 
Posts: n/a
Default The NOW function

Probably something like this: http://www.cpearson.com/excel/ontime.htm

************
Hope it helps!
Anne Troy
www.OfficeArticles.com

"Atreides" <atreides1AThotmailD0Tcom wrote in message
...
Usually the NOW function does not update until you save or re-open the
file
or press calculate (F9).

However I somehow managed to get it to update constantly (so I could have
a
countdown clock running). Does anyone know how to do this?

Thanks
Atreides



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Atreides
 
Posts: n/a
Default The NOW function

Thanks Anne, almost there..

That bit of code sets up a periodically running subroutine... but what to
put in the subroutine? How can I make it so that a specific cell always shows
the instantaneous current time?

Peter

"Anne Troy" wrote:

Probably something like this: http://www.cpearson.com/excel/ontime.htm

************
Hope it helps!
Anne Troy
www.OfficeArticles.com

"Atreides" <atreides1AThotmailD0Tcom wrote in message
...
Usually the NOW function does not update until you save or re-open the
file
or press calculate (F9).

However I somehow managed to get it to update constantly (so I could have
a
countdown clock running). Does anyone know how to do this?

Thanks
Atreides




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default The NOW function

Dim nTime As Double
Sub myClock()
nTime = Now + TimeSerial(0, 0, 1) ' 1 secs
Worksheets("Sheet1").Range("A1").Value = Time
Application.OnTime nTime, "myClock"
End Sub

Sub StopClock()
Application.OnTime nTime, "myClock",,False
End Sub

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Atreides" <atreides1AThotmailD0Tcom wrote in message
...
Thanks Anne, almost there..

That bit of code sets up a periodically running subroutine... but what to
put in the subroutine? How can I make it so that a specific cell always

shows
the instantaneous current time?

Peter

"Anne Troy" wrote:

Probably something like this: http://www.cpearson.com/excel/ontime.htm

************
Hope it helps!
Anne Troy
www.OfficeArticles.com

"Atreides" <atreides1AThotmailD0Tcom wrote in message
...
Usually the NOW function does not update until you save or re-open the
file
or press calculate (F9).

However I somehow managed to get it to update constantly (so I could

have
a
countdown clock running). Does anyone know how to do this?

Thanks
Atreides






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Anne Troy
 
Posts: n/a
Default The NOW function

Thank you, Bob. We both know I could not have answered that. :)
hugs & kisses
************
Hope it helps!
Anne Troy
www.OfficeArticles.com

"Bob Phillips" wrote in message
...
Dim nTime As Double
Sub myClock()
nTime = Now + TimeSerial(0, 0, 1) ' 1 secs
Worksheets("Sheet1").Range("A1").Value = Time
Application.OnTime nTime, "myClock"
End Sub

Sub StopClock()
Application.OnTime nTime, "myClock",,False
End Sub

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Atreides" <atreides1AThotmailD0Tcom wrote in message
...
Thanks Anne, almost there..

That bit of code sets up a periodically running subroutine... but what to
put in the subroutine? How can I make it so that a specific cell always

shows
the instantaneous current time?

Peter

"Anne Troy" wrote:

Probably something like this: http://www.cpearson.com/excel/ontime.htm

************
Hope it helps!
Anne Troy
www.OfficeArticles.com

"Atreides" <atreides1AThotmailD0Tcom wrote in message
...
Usually the NOW function does not update until you save or re-open
the
file
or press calculate (F9).

However I somehow managed to get it to update constantly (so I could

have
a
countdown clock running). Does anyone know how to do this?

Thanks
Atreides









  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Atreides
 
Posts: n/a
Default The NOW function

Thanks Bob, that looks promising, however I'm not sure exactly how to run
this code. I assume that I need a sheet labelelled "Sheet1" and that the
clock will appear in cell A1? Perhaps I've entered the code wrong.My VBA
module looks like this:

====

Public RunWhen As Double
Public Const cRunIntervalSeconds = 120 ' two minutes
Public Const cRunWhat = "The_Sub"
Sub StartTimer()

RunWhen = Now + TimeSerial(0, 0, cRunIntervalSeconds)
Application.OnTime earliesttime:=RunWhen, procedu=cRunWhat, _
schedule:=True
End Sub

Sub The_Sub()

Dim nTime As Double
Sub myClock()
nTime = Now + TimeSerial(0, 0, 1) ' 1 secs
Worksheets("Sheet1").Range("A1").Value = Time
Application.OnTime nTime, "myClock"
End Sub

Sub StopClock()
Application.OnTime nTime, "myClock", , False
End Sub

StartTimer

End Sub
Sub StopTimer()
On Error Resume Next
Application.OnTime earliesttime:=RunWhen, _
procedu=cRunWhat, schedule:=False
End Sub

====

Should I have put your block somewhere else?

Thanks
Atreides
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default The NOW function

You don't need anything on the worksheet, it finds A1 itself (you can change
that to any cell you want).

All you need to do is fire it. Goto menu ToolsMacroMacros... and select
StartTimer from the list, then click Run. You can stop it in a similar
manner.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Atreides" <atreides1AThotmailD0Tcom wrote in message
...
Thanks Bob, that looks promising, however I'm not sure exactly how to run
this code. I assume that I need a sheet labelelled "Sheet1" and that the
clock will appear in cell A1? Perhaps I've entered the code wrong.My VBA
module looks like this:

====

Public RunWhen As Double
Public Const cRunIntervalSeconds = 120 ' two minutes
Public Const cRunWhat = "The_Sub"
Sub StartTimer()

RunWhen = Now + TimeSerial(0, 0, cRunIntervalSeconds)
Application.OnTime earliesttime:=RunWhen, procedu=cRunWhat, _
schedule:=True
End Sub

Sub The_Sub()

Dim nTime As Double
Sub myClock()
nTime = Now + TimeSerial(0, 0, 1) ' 1 secs
Worksheets("Sheet1").Range("A1").Value = Time
Application.OnTime nTime, "myClock"
End Sub

Sub StopClock()
Application.OnTime nTime, "myClock", , False
End Sub

StartTimer

End Sub
Sub StopTimer()
On Error Resume Next
Application.OnTime earliesttime:=RunWhen, _
procedu=cRunWhat, schedule:=False
End Sub

====

Should I have put your block somewhere else?

Thanks
Atreides



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Atreides
 
Posts: n/a
Default The NOW function

Thanks Bob, it works!

I'm really new to Macros so I didn't know you could just run them like that.
I only used them to write functions before.

"Bob Phillips" wrote:

You don't need anything on the worksheet, it finds A1 itself (you can change
that to any cell you want).

All you need to do is fire it. Goto menu ToolsMacroMacros... and select
StartTimer from the list, then click Run. You can stop it in a similar
manner.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Atreides" <atreides1AThotmailD0Tcom wrote in message
...
Thanks Bob, that looks promising, however I'm not sure exactly how to run
this code. I assume that I need a sheet labelelled "Sheet1" and that the
clock will appear in cell A1? Perhaps I've entered the code wrong.My VBA
module looks like this:

====

Public RunWhen As Double
Public Const cRunIntervalSeconds = 120 ' two minutes
Public Const cRunWhat = "The_Sub"
Sub StartTimer()

RunWhen = Now + TimeSerial(0, 0, cRunIntervalSeconds)
Application.OnTime earliesttime:=RunWhen, procedu=cRunWhat, _
schedule:=True
End Sub

Sub The_Sub()

Dim nTime As Double
Sub myClock()
nTime = Now + TimeSerial(0, 0, 1) ' 1 secs
Worksheets("Sheet1").Range("A1").Value = Time
Application.OnTime nTime, "myClock"
End Sub

Sub StopClock()
Application.OnTime nTime, "myClock", , False
End Sub

StartTimer

End Sub
Sub StopTimer()
On Error Resume Next
Application.OnTime earliesttime:=RunWhen, _
procedu=cRunWhat, schedule:=False
End Sub

====

Should I have put your block somewhere else?

Thanks
Atreides




  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default The NOW function

A whole new world is opening to you <G

Bob

"Atreides" <atreides1AThotmailD0Tcom wrote in message
...
Thanks Bob, it works!

I'm really new to Macros so I didn't know you could just run them like

that.
I only used them to write functions before.

"Bob Phillips" wrote:

You don't need anything on the worksheet, it finds A1 itself (you can

change
that to any cell you want).

All you need to do is fire it. Goto menu ToolsMacroMacros... and

select
StartTimer from the list, then click Run. You can stop it in a similar
manner.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Atreides" <atreides1AThotmailD0Tcom wrote in message
...
Thanks Bob, that looks promising, however I'm not sure exactly how to

run
this code. I assume that I need a sheet labelelled "Sheet1" and that

the
clock will appear in cell A1? Perhaps I've entered the code wrong.My

VBA
module looks like this:

====

Public RunWhen As Double
Public Const cRunIntervalSeconds = 120 ' two minutes
Public Const cRunWhat = "The_Sub"
Sub StartTimer()

RunWhen = Now + TimeSerial(0, 0, cRunIntervalSeconds)
Application.OnTime earliesttime:=RunWhen, procedu=cRunWhat, _
schedule:=True
End Sub

Sub The_Sub()

Dim nTime As Double
Sub myClock()
nTime = Now + TimeSerial(0, 0, 1) ' 1 secs
Worksheets("Sheet1").Range("A1").Value = Time
Application.OnTime nTime, "myClock"
End Sub

Sub StopClock()
Application.OnTime nTime, "myClock", , False
End Sub

StartTimer

End Sub
Sub StopTimer()
On Error Resume Next
Application.OnTime earliesttime:=RunWhen, _
procedu=cRunWhat, schedule:=False
End Sub

====

Should I have put your block somewhere else?

Thanks
Atreides






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
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Hyperlinks using R[1]C[1] and offset function in its cell referenc Elijah-Dadda Excel Worksheet Functions 0 March 5th 05 03:31 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM
HOW CAN I GET OFFICE 2003 EXCEL BASIC TO NEST FUNCTIONS LIKE EXCE. Robert AS Excel Worksheet Functions 4 December 2nd 04 10:49 AM
Find a Function to use accross different worksheets R. Hale Excel Worksheet Functions 3 November 25th 04 07:07 AM


All times are GMT +1. The time now is 06:36 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"