Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Countdown Timer in excel _ continuous countdown

0

Using this Code it works great!!!

https://www.teachexcel.com/excel-tutorial/countdown-timer-in-excel_1557.html

However... Is there anyway to have the clock always running even when I am in the worksheet adding text or data to other cells? The clock pauses til I click "Enter" or exit out of the cells.

Public interval As Date

Sub timer()

        ' Check if the timer is finished and exit the macro if it is

    If Range("I5").Value = 0 Then Exit Sub

  On Error Resume Next

        ' Remove 1 second from the timer

    Sheets("ScoreBoard").Range("I5").Value = Range("I5").Value - TimeValue("00:00:01")

        ' Set when the macro should run again - should be the same time value as the previous line.

    interval = Now + TimeValue("00:00:01")

        ' Make this macro run again in 1 second

    Application.OnTime interval, "timer"





End Sub
Answer
Discuss



Answer the Question

You must create an account to use the forum. Create an Account or Login