Ok... i have this simple script but it does not seem to
work. I have a form with two textboxes. I want to retrieve
a time from the user. My script was doing just fine, until
I wanted to limit the input for seconds to 59. Caus' i.e.
2 minutes and 74 seconds is weird. So it made a simple
change. But now my script is acting weird and i get the
wrong messageboxes at the wrong moment. I just want a time
and when the user presses a button, it starts calculating
with it... can anybody HELP ME?
Here's my code:
Since this:Code:Private Sub Command1_Click() If Text1.Text = "" Then GoTo error1 ElseIf Text2.Text = "" Then GoTo error1 End If If IsNumeric(Text1.Text) Then GoTo proceed Else GoTo error2 If IsNumeric(Text2.Text) Then GoTo proceed Else GoTo error2 proceed: If Text2.Text > 59 Then GoTo error3 Else calculate End If error1: MsgBox "Please enter a value" GoTo endsub error2: MsgBox "Please enter a number" GoTo endsub error3: MsgBox "Seconds must be below 60" GoTo endsub endsub: End Sub
it is acting weird...Code:If Text2.Text > 59 Then




Reply With Quote