View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Faisal... Faisal... is offline
external usenet poster
 
Posts: 27
Default Countdown Timer - not stopwatch

Tim

It is worth taking Steve's advice because as it stands my code won't
let you close the the file while the macro runs. However, if you
really want to go down this route, then maybe it is worth
incorporating some codes to stop the macro when you press a key (on
your keyboard). Try have a look at Stephen Bullen's code on "check
key pressed":

http://www.bmsltd.co.uk/Excel/Default.htm

Good luck.

Faisal...


On 5 Nov, 19:05, SteveM wrote:
Type the target date/time (12/31/07 23:59) in a cell. Place the Now()
function in an adjacent cell. Subtract the Now cell from the target
date in a third cell. That's the time remaining. Format the third
cell as number. Parse the days and fractional days to days, minutes,
seconds. Done.

The value will only update upon a workbook recalc (F9) unless you have
a macro running in background. But doing that would not allow you to
interact with the book while the marco is running.

SteveM

On Nov 5, 11:16 am, Tim H wrote:



How do I write a countdown timer macro in excel if I have an end date / time
that i want to countdown till? For example, I have in cell A1 - "12/31/2007
11:59:59 PM" and I want to display a countdown timer starting in A2 showing
"X months Y days Z hours AA Minutes BB seconds until New Year's Day"


Thanks.- Hide quoted text -


- Show quoted text -