|
-
Dec 3rd, 2000, 11:11 PM
#1
How do I handle an error that gives a "type mismatch" when
the text boxes are empty?
Thanks everybody
-
Dec 3rd, 2000, 11:14 PM
#2
Dish girlfriend...
In what context are you getting the error. Provide some code.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Dec 4th, 2000, 07:25 AM
#3
Put this line at the very top of all the code.
On Error Resume Next
This line ignores all errors and just stops the code.
-
Dec 4th, 2000, 10:08 AM
#4
Frenzied Member
By Matthew Gates:
On Error Resume Next
This line ignores all errors and just stops the code.
I don't agree matthew, it does not stop the code, it just resumes to the next line, check out this small code.
Code:
Private Sub Form_Load()
On Error Resume Next
Err.Raise 23
MsgBox "test"
End Sub
It'll just display the msgbox 
In case you want to actually Exit the Sub:
Code:
Private Sub Form_Load()
On Error GoTo ErrH
Err.Raise 23
MsgBox "test"
Exit Sub 'In case no errors occur
ErrH:
Exit Sub 'an error occured, exit the sub.
End Sub
I know you already knew all this Matthew, but just to tell the people who didn't
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Dec 4th, 2000, 11:54 AM
#5
Perhaps, a misunderstanding Jop?
What I meant was that it stops the error a.k.a ignores it and continues on.
Sorry I didn't explain myself .
By the way, a little late, but...
Happy Birthday~!
-
Dec 4th, 2000, 11:58 AM
#6
Frenzied Member
No problem Matt...
and hey, better late then never 
thanks!
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|