+ Reply to Thread
Results 1 to 5 of 5

Timer for sheet

  1. #1
    Registered User
    Join Date
    01-18-2015
    Location
    Zurich
    MS-Off Ver
    2016
    Posts
    51

    Timer for sheet

    Does anyone know how to make a timer / countdown function that runs for 2 minutes and then switches from one sheet to another?

    So:

    Run timer
    If time = 120 sec
    Then go to sheet "start"

    Thank you

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Timer for sheet

    You'd use Application.Ontime

    Something like below...
    Please Login or Register  to view this content.
    See link for more detailed tutorial on Application.OnTime.
    http://www.snb-vba.eu/VBA_Application.OnTime_en.html

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Timer for sheet

    Hi Andre,

    I don't know how you want to trigger the code, but running start_timer will wait 2 minutes, then worksheet "Start" will activate.

    Please Login or Register  to view this content.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  4. #4
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,262
    Sir askadi how to do use doevents not application on time.. I ever see use doevents how to fix this code

    Please Login or Register  to view this content.
    [/QUOTE]
    Last edited by daboho; 01-30-2017 at 05:20 PM.

  5. #5
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Timer for sheet

    DoEvents just allows the code to delay to run other things (I don't find it helps a lot most of the time), however, the method you are looking for should be something like this... round, 2 gives seconds which is why I've made it stop at 120. I put >= in case it is 121 seconds for some reason... if we stop only if =120 then if we miss 120 exactly it will never stop:

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. sign in sheet wth timer
    By g4tso in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-10-2014, 10:51 PM
  2. timer for 30 minutes and timer based events
    By mohak12 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-11-2014, 06:20 PM
  3. [SOLVED] Help needed! Timer for the work sheet
    By dgavranovic in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-24-2014, 01:56 PM
  4. [SOLVED] Timer on a spread sheet to shut down
    By Treecko in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-30-2013, 12:47 PM
  5. How to add a Timer For Excel Sheet
    By albatreek in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-28-2013, 02:48 AM
  6. Replies: 1
    Last Post: 12-12-2012, 08:46 PM
  7. [SOLVED] Stopping a Timer / Running a timer simultaneously on Excel
    By Paul23 in forum Excel General
    Replies: 1
    Last Post: 03-10-2006, 08:10 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1