How to Create Timer-Counter Using Excel VBA

Home More Excel (VBA) Training Videos

You wish to display how the population of your country or the world is increasing while you give a presentation on economics and population or you wish to measure the completion of a chemical reaction, you can do this by using a timer created with the 'OnTime' method using Excel VBA.
The aim of this video is not only to show you how to create a timer that also works as a counter but show you more features and benefits of Excel VBA for automation purposes. In fact, you learn interesting tjhings like how to access a subroutine or macro from another subroutine.

The OnTime method schedules a procedure to be run at a specified time in the future after a specific amount of time has passed and has the following syntax:
OnTime(EarliestTime, Procedure, LatestTime, Schedule)
EarliestTime: This parameter is required or necessary and indicates the time when you wish to run the procedure
Procedure: This parameter is required and must be created
LatestTime: This aparameter is optional and indicates the latest time when the procedure can be run
Schedule: It is an optional parameter. Its default value is True. If set to False it clears an earlier set procedure