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

Recommended Answers

Try this :

Private Sub Timer1_Timer()
TCount = TCount - 1

Label1.Caption = TCount  
If TCount = 0 Then
  Msgbox "Time's UP!"
End If
End Sub
Jump to Post

All 2 Replies

Try this :

Private Sub Timer1_Timer()
TCount = TCount - 1

Label1.Caption = TCount  
If TCount = 0 Then
  Msgbox "Time's UP!"
End If
End Sub

If done then please mark this thread as solved.

Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.