How to Create a Countdown Timer Clock in Excel and VBA

anameiwontforget · 256K views · 2015 · 8:25

Open on YouTube

Python, Ruby & scripting languagesSoftware (other)tutorial

Why Stack Overflow recommends it

Stack Overflow users link it as a worked example of an Excel VBA countdown timer, either to show what they want to build or to explain where their timer code came from.

Recommended by 0 people across 0 different months, 2016 to 2019.

What it is

A short tutorial showing how to build a countdown timer clock in Excel 2007 using VBA and the Application.OnTime event. The presenter frames it as a backbone template that can be adapted for other time-based functions.

What people said

Cites Dingo Kilo · 2016-06 · Stack Overflow · on “VBA Macro for Time-Pressured Arithmetic”

I'm trying to write a macro using VBA that will ask a given number of simple arithmetic questions, with each question being available for answer only for a specified amount of time. I wish to specify somewhere in the worksheet where I can set the parameters of the game (e.g. 20 questions with 12 seconds to answer each) and then click a go button that will continually throw up input boxes every 12 seconds (and remove the previous one at the end of the 12 seconds OR when the person clicks "next" or "ok") until the 20 question quota has been reached, all the while recording the answers and time taken. I'm quite new to VBA but have made a lot of headway using mostly this site. So far I have the

Cites luqman hakim · 2017-12 · Stack Overflow · on “Countdown timer start/stop/reset button with Apps Script to Google Sheets”

actually i have not done script writing, i just is the beginning user of google sheets. I mean I want to create something like this [this video] in the video using excel VBA. please help me to solve it.

Cites JKoppel · 2019-04 · Stack Overflow · on “Type mis-match error in VBA for Excel countdown timer”

I'm trying to create a simple timer in Excel using VBA code. However, I'm receiving a run-time error type mismatch in one of the applications. Included in the timer are stop and start buttons. All code below. The error occurs in this line: Sheet1.Range("B1").Value = Sheet1.Range("B1").Value - TimeValue("00:00:01") The error is type mismatch variant\string vs variant\integer. The code is exactly what is shown on an youtube video. In the video it worked just fine. [this video] Here is the code for the buttons and the routines. Can someone please advise a fix? I'd be very appreciative. Thanks! Private Sub CommandButton1_Click() starttimer End Sub Private Sub CommandButton2_Click() stoptimer End Sub