Hi all,Can you help me with the script below. I found this code on a old posting. I would like to able too input a value for hours and have that countdown also.ThanksPaul
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Dim hours As Integer = countminutes.Text Dim minutes As Integer = countminutes.Text Dim seconds As Integer = countseconds.Text If hours = 0 And minutes = 0 And seconds = 0 Then 'MsgBox("Time Ended") Timer1.Stop() End If If seconds = 0 Then minutes -= 1 seconds += 60 End If seconds -= 1 If minutes <> -1 Then counthours.Text = minutes countminutes.Text = minutes countseconds.Text = seconds End If End Sub Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If InStr(timetowait.Text, ":") Then Dim time() As String time = Split(timetowait.Text, ":", , CompareMethod.Text) countminutes.Text = time(0) countseconds.Text = time(1) Timer1.Interval = 1000 Timer1.Start() Else : MsgBox("You have to insert like this 1:10") End If End Sub