954,557 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Countdown Timer

Hi All,
I try to make count down timer but.
This following is my code but it just decrease one time and stop.

Dim TCount As Integer

Private Sub Form_Load()
TCount = 30
Label1.Caption = "30"
End Sub

Private Sub Timer1_Timer()
Label1.Caption = TCount  - 1
If TCount  = 0 Then
  Msgbox "Time's UP!"
End If
End Sub


Please Help.
Thank you

Sturdy
Light Poster
34 posts since Mar 2011
Reputation Points: 28
Solved Threads: 1
 

Try this :

Private Sub Timer1_Timer()
TCount = TCount - 1

Label1.Caption = TCount  
If TCount = 0 Then
  Msgbox "Time's UP!"
End If
End Sub
Jx_Man
Nearly a Senior Poster
3,329 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444
 

If done then please mark this thread as solved.

Thanks.

Jx_Man
Nearly a Senior Poster
3,329 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: