I'm making a countdown timer but after a number reaches zero it goes to negative numbers and i cant find the problem in my code
Code:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Sec.Text = Val(Sec.Text) - 1
If Sec.Text = 0 Then
Min.Text = Val(Min.Text) - 1
Sec.Text = 59
If Min.Text = 0 Then
Hour.Text = Val(Hour.Text) - 1
Min.Text = 59
End If
End If
End Sub