Last active
July 22, 2017 14:59
-
-
Save ndthanh/ab52225999e2f70c0ca73ec0772f2d9f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim gCount As Date | |
'Updateby20140925 | |
Sub Timer() | |
gCount = Now + TimeValue("00:00:01") | |
Application.OnTime gCount, "ResetTime" | |
End Sub | |
Sub ResetTime() | |
Dim xRng As Range | |
Set xRng = Application.ActiveSheet.Range("E1") | |
xRng.Value = xRng.Value - TimeSerial(0, 0, 1) | |
If xRng.Value <= 0 Then | |
MsgBox "Countdown complete." | |
Exit Sub | |
End If | |
Call Timer | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment