How to Create Timer Counter Using Excel VBA

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 things 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


3 thoughts on “How to Create Timer Counter Using Excel VBA

  1. Salim -- Lebanon

    Hi Mr.Dinesh
    Please I have a question
    I Know how to run a macro by another macro But:
    How to stop running a macro by another one in same (or other) module,knowing that the 2nd macro is on action

    Reply
    1. Matty

      Herzlichen GlnhukwcÃsc¼!wir freuen uns über das Baby, Annemarie Nao, und die beiden, Nao und Vanessa, sind gesund. Das ist die Hauptsache!Viele Grüße von Barbara, Mika, Jo und mir an die zwei.Yasushi

      Reply
    2. moving discounts

      I am so hurt by this lose. Seriously, Michaels music is the sound track of my life. He was my first major crush, in the late seventies and early eighties when white fols declared Disco sucks MJ moonwalked across the stage and got everyone off their asses, He put MTV on the international map and without him there would be know Usher, hris Brown or a hundred other singers.I pray for him and his family

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *