Reply To: ghostriderofthenite Ultimate Bot project

#94470

trying add question delay timer im missing something lol it dont work like count down timer

Private Sub Data1_Validate(Action As Integer, Save As Integer)

End Sub

Private Sub Command1_Click()
    'Set Delay button - turn on timer and disable Reset Delay
'button
    Timer2.Enabled = True
    
End Sub

Private Sub Command12_Click()
    'Reset Delay button. You can restart countdown by clicking
'the Set Delay button. Or reset the time by clicking
'the Reset Delay button.
    Timer2.Enabled = False
    Command13.Enabled = True
End Sub

Private Sub Command13_Click()
    'Reset Delay button. You can restart countdown by clicking
'the Set Delay button. Or reset the time by clicking
'the Reset Delay button.
    Timer2.Enabled = False
    Command13.Enabled = True
End Sub

Private Sub Command7_Click()
Adodc1 = True
End Sub

Private Sub List1_Click()

End Sub

Private Sub Text1_Change()
'Call Mydisplay sub to display text box data
    Mydisplay
End Sub
Private Sub Mydisplay()
'This code is common to all three text boxes so I
'put it in it's own sub.

'Extract the numbers from the text boxes by using
'the Val() statement.
    Hours = Val(Text3.Text)
    Minutes = Val(Text4.Text)
    Seconds = Val(Text5.Text)
'Convert variables to time format
    Time = TimeSerial(Hours, Minutes, Seconds)
'Display the converted time variable in label 1
    Label7.Caption = Format$(Time, "hh") & ":" & Format$(Time, "nn") & ":" & Format$(Time, "ss")
End Sub

Private Sub Label7_Click()

End Sub

Private Sub Text5_Change()
'Call Mydisplay sub to display text box data
    Mydisplay
End Sub

Private Sub Text6_Change()
'Call Mydisplay sub to display text box data
    Mydisplay
End Sub
Private Sub Text7_Change()
'Call Mydisplay sub to display text box data
    Mydisplay
End Sub
Private Sub Timer2_Timer()
    'Count down loop
    Timer2.Enabled = False
    If (Format$(Time, "hh") & ":" & Format$(Time, "nn") & ":" & Format$(Time, "ss")) <> "00:00:00" Then 'Counter to continue loop until 0
        Time = DateAdd("s", -1, Time)
        Label7.Visible = False
        Label7.Caption = Format$(Time, "hh") & ":" & Format$(Time, "nn") & ":" & Format$(Time, "ss")
        Label7.Visible = True
        Timer2.Enabled = True
    Else
        'Turn off timer, set off alarm, and enable reset.
        Timer2.Enabled = False
        Command13.Enabled = True
    End If
End Sub