+ Reply to Thread
Results 1 to 5 of 5

VBA countdown timer

  1. #1
    Registered User
    Join Date
    01-31-2019
    Location
    varna
    MS-Off Ver
    2016
    Posts
    16

    VBA countdown timer

    Hello,

    I have made a countdown timer and used some VBA code to trigger it. Now i want to remove all formulas used and express everything with VBA, but i simply dont uderstand how to write it. Have tried:
    Please Login or Register  to view this content.
    but then the timer does not work.

    Original file attached. I want to remove all formulas from it and leave only VBA.

    Any guidance or help appreciated.
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: VBA countdown timer

    At the end of the code you need to call another macro, that calls the countdown macro again, you also need a way to stop the code.

    I just thought of placing the word "Stop" in D1 and the loop will stop.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-31-2019
    Location
    varna
    MS-Off Ver
    2016
    Posts
    16

    Re: VBA countdown timer

    Hi davesexcel,

    Thank you for this! It works almost perfect

    The issue i am having with it now is that when multiple workbooks are opened and i try to close the countdown file, it reopens again.

    I have simple on open and on save code that starts the countdown macro.

    Please Login or Register  to view this content.
    Any idea what causes this issue?

    Thanks.

  4. #4
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: VBA countdown timer

    The attached is another approach, press key to continue, picks up the countdown automatically.
    At present hard coded into your end time ( 01/01/2020 00:00:00 )
    You could alter this by putting your terminal date/time in a cell and referencing the code to this.
    torachan.
    Attached Files Attached Files

  5. #5
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: VBA countdown timer

    Try this way.

    In Standard Module.
    Please Login or Register  to view this content.
    In ThisWorkbook.
    Please Login or Register  to view this content.
    Last edited by bakerman2; 10-03-2019 at 10:07 AM.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

+ 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. [SOLVED] hwnd timer pause VBA countdown timer
    By jaryszek in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-05-2019, 04:25 AM
  2. Countdown timer Working BUT starting the timer repeatedly SPEEDS UP TIMER!
    By Vinospam in forum Excel Programming / VBA / Macros
    Replies: 67
    Last Post: 03-30-2019, 06:42 PM
  3. Countdown timer
    By Shamz41 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-11-2017, 08:17 AM
  4. Countdown timer
    By Maxicell in forum Excel General
    Replies: 0
    Last Post: 01-11-2017, 07:18 AM
  5. Countdown Timer
    By colt seavers in forum Excel General
    Replies: 3
    Last Post: 01-12-2010, 12:23 PM
  6. HELP for COUNTDOWN TIMER
    By CC in forum Excel General
    Replies: 3
    Last Post: 05-08-2006, 07:55 AM

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