+ Reply to Thread
Results 1 to 4 of 4

Countdown timer

  1. #1
    Registered User
    Join Date
    08-21-2007
    Posts
    13

    Countdown timer

    Is it possible to have a timer which has a variable timed session. eg 10mins or 12mins or 20mins. and you click on a start button to start it counting down but while it is running you can enter data into the cells and as soon as the timed session has elapsed you are not allowed to enter anymore data. until the sheet has been saved and the timer has been re-started.

    thx for any help in advance.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Ukmxer,

    This example uses 2 macros. ActivateTimer can be assigned to a button on the worksheet. Clicking the button will start the count down. In this case it is set for 10 seconds. The time can be set from hours, to minutes, or seconds. When the time has expired a Message Box Dialog appears notifying you that time is up. Once the user responds, the SaveAs Dialog is displayed. The only way to get back to Excel is to save the workbook. Place this code in a Standard VBA module.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    08-21-2007
    Posts
    13
    Hi Leith, thank you for your help. The macro works great.

    Is it possible to have the timer displayed in a font of about size 48 whilst it is running, so the person doing the data input can see how much time is left before input is frozen.

    thank you

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Ukmxer,

    Not with this macro. Once it is activated, there is no way to access the time ticks. The only way I know of to do this is using an API timer. However, the API timer can become unstable and crash Excel. I have tried many techniques to improve its reliability, but I haven't been 100% successful.

    Sincerely,
    Leith Ross

+ 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