+ Reply to Thread
Results 1 to 3 of 3

Countdown Timer on a Userform1

  1. #1
    Forum Contributor
    Join Date
    01-07-2012
    Location
    Bangalore
    MS-Off Ver
    Office 365
    Posts
    368

    Countdown Timer on a Userform1

    Thank You So Much!
    Attached Files Attached Files
    Last edited by Rajeshkumar R; 12-29-2016 at 11:28 PM. Reason: Query Solved

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

    Re: Countdown Timer on a Userform1

    Hi Rajeshkumar R,

    Try the attached mofied copy of your file which contains the following code using an API Timer (Application Programming Interfaces). I had problems using your Label (it did not display properly), so I had to replace it. Please note that the timer MUST be stopped (done by the code below) when the UserForm closes and before the file closes or Excel may crash.

    In the ThisWorkbook code module:
    Please Login or Register  to view this content.
    In the UserForm1 Code module:
    Please Login or Register  to view this content.
    In Ordinary Code Module ModApiTimer:
    Please Login or Register  to view this content.
    It is a best practice to declare all variables. If you misspell a variable in your code, VBA will silently assume it is a Variant variable and go on executing with no clue to you that you have a bug. Go to the VBA development window, click Tools, Options, and check "Require Variable Declaration." This will insert the following line at the top of all new modules:
    Please Login or Register  to view this content.
    This option requires all variables to be declared and will give a compiler error for undeclared variables.

    To access a Code Module in VBA:
    a. 'Left Click' on any cell in the Excel Spreadsheet.
    b. ALT-F11 to get to VBA.
    c. CTRL-R to get project explorer (if it isn't already showing).
    d. 'Double Click' on the module you want to access in the 'Project Explorer'.
    e. Insert code into the module if needed. 'Option Explicit' should only appear ONCE at the top of the module.

    Lewis

  3. #3
    Forum Contributor
    Join Date
    01-07-2012
    Location
    Bangalore
    MS-Off Ver
    Office 365
    Posts
    368

    Re: Countdown Timer on a Userform1

    Dear LJMetzger,

    Thank You So Much for your suggestions, It just Awesome!

    And the way you had explained also, its very crystal clear and gave me some confident to learn more on this VBA...

    Once again Thank You So Much!

    Regards,
    Rajeshkumar R

+ 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. Timer Countdown
    By Chris Wareham in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-31-2011, 12:38 AM
  2. countdown timer
    By pka in forum Excel General
    Replies: 0
    Last Post: 10-23-2011, 09:18 AM
  3. Countdown timer
    By ukmxer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-05-2007, 02:49 AM
  4. Countdown timer
    By Nemeo in forum Excel General
    Replies: 1
    Last Post: 05-24-2007, 09:37 PM
  5. Countdown timer
    By Nemeo in forum Excel General
    Replies: 0
    Last Post: 05-23-2007, 03:12 AM
  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