Option Explicit
Dim timer as boolean (This will be a global variable, accessed from everywhere)
Form_load() (there should be something like this when you double click the form)
timer = true
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim intsec as integer
Dim intmin as integer
Dim inthour as integer
intsec = val(sec.text)
intmin = val(min.text)
inthour = val(hour.text)
If timer = true then
intsec = intsec - 1
If (intsec = 0 or sec.text = "") and (intmin = 0 or min.text = "") and (inthour = 0 or hour.text = 0) Then
timer = false
else if intsec = 0 then
if intmin > 0 then
intmin = intmin - 1
intsec = 59
Else if intmin = 0 and inthour > 0 Then
inthour = inthour - 1
intmin = 59
intsec = 59
End If
End If
end if
sec.text = intsec
min.text = intmin
hour.text = inthour
(Else if might be elseif)
End Sub