Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. Dim gCount As Date
  2. 'Updateby20140925
  3. Sub Timer()
  4. gCount = Now + TimeValue("00:00:01")
  5. Application.OnTime gCount, "ResetTime"
  6. End Sub
  7. Sub ResetTime()
  8. Dim xRng As Range
  9. Set xRng = Application.ActiveSheet.Range("E1")
  10. xRng.Value = xRng.Value - TimeSerial(0, 0, 1)
  11. If xRng.Value <= 0 Then
  12. MsgBox "Countdown complete."
  13. Exit Sub
  14. End If
  15. Call Timer
  16. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement