Results 1 to 6 of 6

Countdown Timer Pause and Resume Button

Threaded View

  1. #1
    Registered User
    Join Date
    10-20-2009
    Location
    Prineville, OR
    MS-Off Ver
    Office 2010
    Posts
    33

    Countdown Timer Pause and Resume Button

    Hey guys, I'm new so please forgive me for the simple questions that I'm coming up with. You are all helping me out so much and I apprecaite it very much.

    I am trying to create a countdown timer my class. I want to give them an amount of time to discuss a certain topic then bring them all back together as a class to discuss what they talked about.

    Anyway the start buttons work. I want to insert a button that will pause this (so the we can clarify something if needed) and then when I click start it will continue right where it left off.

    Sub CountDown()
    
    If Range("Time") <= 0 Then
    GoTo 10
    
    Else
    Range("Time") = Range("Wanted")
    
    10:
    End If
    
    20:
    Dim PauseTime, Start
    
    PauseTime = 1
    Start = Timer
    Do While Timer < Start + PauseTime
    DoEvents
    
    Loop
    
    Range("Time").Value = Range("Time").Value - 1
    
    If Range("Time").Value <= 0 Then
    
    MsgBox "STOP"
    Exit Sub
    End If
    
    GoTo 20
    End Sub
    Last edited by table83; 02-07-2010 at 02:21 AM.

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