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

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.