+ Reply to Thread
Results 1 to 4 of 4

VBA for multiple countdowns, print times, then exit without saving

  1. #1
    Registered User
    Join Date
    07-29-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    2

    VBA for multiple countdowns, print times, then exit without saving

    Hello all!

    I have worked for 2 days on this issue and I am barely half way there.

    Untitled.jpg

    The time is the counting down total time allowed for all phases of the activity. I need it to start on open and only have a stop/pause button. I also need the Target Time cells to count down once the main timer starts. So when the file is opened, the overall countdown begins then cell C2 will countdown to 0 and stop, the cell C4 will countdown to 0 then stop and so on.

    Here is my main timer code:

    Please Login or Register  to view this content.
    Is this at all possible!?

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: VBA for multiple countdowns, print times, then exit without saving

    Hi kennethbass and welcome to ExcelForum,

    See the file associated with post #4 in the following thread: http://www.excelforum.com/excel-prog...wn-timers.html

    The file uses code similar to yours to time multiple (5) events. The code you want to focus on is located in module ModApp:
    a. Sub Timer0ProjectSpecificExpirationHandler() which:
    (1) Calls DisplayCurrentTime() to update the Time of Day Display.
    (2) Calls PollTimersAndColorTimerStatusCells() to update the countdown timers.
    (3) Calls Timer0Start to schedule the timer to run again.
    b. Sub PollTimersAndColorTimerStatusCells() which updates the display on the SpreadSheet.

    In the file all timers are started manually by User Click. All Timers stop when the Time of Day display is disabled.
    To start all the timers programmatically, you would:
    Please Login or Register  to view this content.
    I hope this helps.

    Lewis

  3. #3
    Registered User
    Join Date
    07-29-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    2

    Re: VBA for multiple countdowns, print times, then exit without saving

    Lewis,

    Thank you for the response and reference! However, I need mine to be as automated as possible. I want to have a RunAll() macro assigned to the Start button next to the timer. When it starts that 8 hour countdown, I need cell C3 to start counting down from 45 minutes, when that reaches 0, then cell C4 start counting down from 2 hours and 40 minutes until it reaches 0 and so on.

    So if I didn't explain well enough in the OP.

  4. #4
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: VBA for multiple countdowns, print times, then exit without saving

    It seems like you need additional help implementing the timers. If you upload a sample workbook, I can add code to do what you want. Please indicate what you want done (if anything), when each timer reaches ZERO.

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

    Lewis

+ 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] Print same page, multiple times based on dates entered
    By DixieLou in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-01-2014, 04:32 PM
  2. Replies: 3
    Last Post: 12-21-2012, 06:03 PM
  3. Macro to Loop Print 1 Template multiple times
    By run2win17 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-07-2011, 03:29 PM
  4. Repeating multiple cells a set number of times to print labels
    By Jenrich in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-10-2009, 03:21 PM
  5. Print a certificate multiple times with different data
    By scoreed in forum Excel General
    Replies: 4
    Last Post: 09-15-2007, 08:48 PM
  6. Exit with out saving
    By Greg in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-12-2006, 02:15 PM
  7. Replies: 4
    Last Post: 03-31-2005, 05:06 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