+ Reply to Thread
Results 1 to 8 of 8

Running multiple timers

  1. #1
    Registered User
    Join Date
    09-17-2006
    Posts
    4

    Running multiple timers

    I made timer program that has 3 timers, one that runs from start to stop and two other that can be stopped and continued. Now my problem is how I get all three timers running at same time.
    Here's excel file so its easier to explore it: Combat%20laskuri.xls

    Please Login or Register  to view this content.
    Last edited by tropy; 09-17-2006 at 07:52 AM.

  2. #2
    Forum Contributor colofnature's Avatar
    Join Date
    05-11-2006
    Location
    -
    MS-Off Ver
    -
    Posts
    301
    This might help:
    http://www.xl-logic.com/xl_files/vba/active_clock.zip

    Col
    If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime.

  3. #3
    Registered User
    Join Date
    09-17-2006
    Posts
    4
    Looks good, but it doesnt works, least not in my computer, there's error in line marked with yellow
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor colofnature's Avatar
    Join Date
    05-11-2006
    Location
    -
    MS-Off Ver
    -
    Posts
    301
    What's the error?

  5. #5
    Registered User
    Join Date
    09-17-2006
    Posts
    4
    Runtime error 1004
    Application-defined or object-defined error

  6. #6
    Forum Contributor colofnature's Avatar
    Join Date
    05-11-2006
    Location
    -
    MS-Off Ver
    -
    Posts
    301
    Hmm. It works fine for me opened from the zip file. Unless you're doing something else (?) I have no idea what's causing that. Sorry!

  7. #7
    Registered User
    Join Date
    09-17-2006
    Posts
    4
    I selected empty cell and pressed "Click_StopWatch" button, then I got this error.

  8. #8
    Forum Contributor colofnature's Avatar
    Join Date
    05-11-2006
    Location
    -
    MS-Off Ver
    -
    Posts
    301
    Anyway, the idea is that you have one cell, call it "time_now", whose value is the current time. You then schedule a macro to update this cell every second, like this:


    Please Login or Register  to view this content.
    "SetTime" starts the timer, "Disable" stops it. "Recalc" will be run every second by the "Application.ontime" command and will update "time_now".

    Your macros to start and stop your 3 timers will now use formulae linked to "time_now", e.g.

    =time_now-38977.6132315972

    where 38977.6132315972 is the value of Now as I write this. Each time time_now is updated, all these formulae will also change.



    C
    Last edited by colofnature; 09-17-2006 at 09:50 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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