#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default countdown

Hello,
I am trying to get a running countdown in excel - is there
combination of formulas I could use or would this require a macro an
if so, what would the code be?
Example: Using the current date and time, how many hours unti
midnight, 07/31/2004?
Thanks

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default countdown

from vba help for ontime

OnTime Method
See Also Applies To Example Specifics
Schedules a procedure to be run at a specified time in the future (either at
a specific time of day or after a specific amount of time has passed).

expression.OnTime(EarliestTime, Procedure, LatestTime, Schedule)

expression Required. An expression that returns an Application object.

EarliestTime Required Variant. The time when you want this procedure to be
run.

Procedure Required String. The name of the procedure to be run.

LatestTime Optional Variant. The latest time at which the procedure can be
run. For example, if LatestTime is set to EarliestTime + 30 and Microsoft
Excel is not in Ready, Copy, Cut, or Find mode at EarliestTime because
another procedure is running, Microsoft Excel will wait 30 seconds for the
first procedure to complete. If Microsoft Excel is not in Ready mode within
30 seconds, the procedure won't be run. If this argument is omitted,
Microsoft Excel will wait until the procedure can be run.

Schedule Optional Variant. True to schedule a new OnTime procedure. False
to clear a previously set procedure. The default value is True.

Remarks
Use Now + TimeValue(time) to schedule something to be run when a specific
amount of time (counting from now) has elapsed. Use TimeValue(time) to
schedule something to be run a specific time.

Example
This example runs my_Procedure 15 seconds from now.

Application.OnTime Now + TimeValue("00:00:15"), "my_Procedure"This example
runs my_Procedure at 5 P.M.

Application.OnTime TimeValue("17:00:00"), "my_Procedure"This example cancels
the OnTime setting from the previous example.

Application.OnTime EarliestTime:=TimeValue("17:00:00"), _
Procedu="my_Procedure", Schedule:=False
--
Don Guillett
SalesAid Software

"sixfivebeastman " wrote in
message ...
Hello,
I am trying to get a running countdown in excel - is there a
combination of formulas I could use or would this require a macro and
if so, what would the code be?
Example: Using the current date and time, how many hours until
midnight, 07/31/2004?
Thanks!


---
Message posted from
http://www.ExcelForum.com/



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
How to set up countdown timer to countdown days to a specific day Jenny Excel Worksheet Functions 3 May 8th 23 07:43 PM
countdown puiuluipui Excel Discussion (Misc queries) 9 November 26th 09 10:30 AM
Countdown simserob Excel Worksheet Functions 4 July 22nd 06 02:40 AM
Countdown simserob Excel Worksheet Functions 0 July 21st 06 06:27 PM
Countdown simserob Excel Worksheet Functions 0 July 21st 06 06:26 PM


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