ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Count Down Timer in 1 sec. increments (https://www.excelbanter.com/excel-programming/288516-count-down-timer-1-sec-increments.html)

Bob[_48_]

Count Down Timer in 1 sec. increments
 
I have a request to program one cell of a spreadsheet that
the user can type a minute value (i.e. 00:10:00) and when
they press the enter key (with focus on this cell) a timer
starts and the display changes to count down to 00:00:00.
The value will be entered in minutes, so if there is any
way that the user just has to enter "10" instead of the
entire 8 character time format, that would be ideal.

Can anyone help with this?

BrianB

Count Down Timer in 1 sec. increments
 
Here's one for seconds

'=======================================
Sub countdown()
t = ActiveSheet.Range("A1").Value
For s = t To 0 Step -1
ActiveSheet.Range("A1").Value = s
Application.Wait Now + TimeValue("00:00:01")
Next
End Sub
'======================================


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



All times are GMT +1. The time now is 07:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com