Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 207
Default Timer in Excel

I need to set a timer at 1 minute interval for various time ranges. Start
time is in cell C2, end time is in cell D2. This time frame is mostly less
than 2 hours, but on rare occassions can be upto 4 hours.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 195
Default Timer in Excel

Hi I am little confused...when you say set a timer at a1 minute
interval ..do you mean display the time elaspsed every minute...for the
period between C2 and D2??if so where do you want to see the elapsed
time?
FloMM2 wrote:
I need to set a timer at 1 minute interval for various time ranges. Start
time is in cell C2, end time is in cell D2. This time frame is mostly less
than 2 hours, but on rare occassions can be upto 4 hours.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Timer in Excel

Try something like

Sub CallTimer()

If nTime = 0 Then
nTime = Range("B2").Value
Else
Range("A1").Value = Format(Now(), "hh:mm")
End If
If nTime < Range("D2").Value Then
nTime = nTime + TimeSerial(0, 1, 0)
Application.OnTime Date + nTime, "CallTimer"
End If
End Sub



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"FloMM2" wrote in message
...
I need to set a timer at 1 minute interval for various time ranges. Start
time is in cell C2, end time is in cell D2. This time frame is mostly less
than 2 hours, but on rare occassions can be upto 4 hours.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 207
Default Timer in Excel

Steve,
Sorry: Starting in column B, at cell B4 thru B?? at 1 minute interval until
time is equal to cell D2.
Thanx :-)
FloMM2
"stevebriz" wrote:

Hi I am little confused...when you say set a timer at a1 minute
interval ..do you mean display the time elaspsed every minute...for the
period between C2 and D2??if so where do you want to see the elapsed
time?
FloMM2 wrote:
I need to set a timer at 1 minute interval for various time ranges. Start
time is in cell C2, end time is in cell D2. This time frame is mostly less
than 2 hours, but on rare occassions can be upto 4 hours.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 207
Default Timer in Excel

Bob,
I ran your sample, after adding a DIM nTime.
It runs, but the data (time) is not added to the spreadsheet.
Thanx:-)
FloMM2

"Bob Phillips" wrote:

Try something like

Sub CallTimer()

If nTime = 0 Then
nTime = Range("B2").Value
Else
Range("A1").Value = Format(Now(), "hh:mm")
End If
If nTime < Range("D2").Value Then
nTime = nTime + TimeSerial(0, 1, 0)
Application.OnTime Date + nTime, "CallTimer"
End If
End Sub



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"FloMM2" wrote in message
...
I need to set a timer at 1 minute interval for various time ranges. Start
time is in cell C2, end time is in cell D2. This time frame is mostly less
than 2 hours, but on rare occassions can be upto 4 hours.






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Timer in Excel

Sub CallTimer()

If nTime = 0 Then
nTime = Range("B2").Value
Else
Range("A1").End(xlup)(2).Value = Format(Now(), "hh:mm")
End If
If nTime < Range("D2").Value Then
nTime = now() + TimeSerial(0, 1, 0)
Application.OnTime ntime, "CallTimer"
End If
End Sub

If you are actively using the computer while this is running, it could cause
variations in the times posted.
--
Regards,
Tom Ogilvy



loMM2" wrote in message
...
Bob,
I ran your sample, after adding a DIM nTime.
It runs, but the data (time) is not added to the spreadsheet.
Thanx:-)
FloMM2

"Bob Phillips" wrote:

Try something like

Sub CallTimer()

If nTime = 0 Then
nTime = Range("B2").Value
Else
Range("A1").Value = Format(Now(), "hh:mm")
End If
If nTime < Range("D2").Value Then
nTime = nTime + TimeSerial(0, 1, 0)
Application.OnTime Date + nTime, "CallTimer"
End If
End Sub



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"FloMM2" wrote in message
...
I need to set a timer at 1 minute interval for various time ranges.
Start
time is in cell C2, end time is in cell D2. This time frame is mostly
less
than 2 hours, but on rare occassions can be upto 4 hours.






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 in Excel Gil Excel Discussion (Misc queries) 2 January 14th 10 12:57 PM
Stopping a Timer / Running a timer simultaneously on Excel Paul23 Excel Discussion (Misc queries) 1 March 10th 06 12:08 PM
timer in Excel VBA pham xuan tien Excel Programming 2 September 21st 05 10:43 AM
Excel VBA - Timer Xing Zhou Excel Programming 4 July 23rd 04 04:03 PM
Excel VBA - Timer Xing Zhou Excel Programming 0 July 22nd 04 09:02 AM


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