error message

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I found how to get rid of an error message earlier, but now I can't find it.
I have an error message pop up when I close a form. The error message is
correct, however I would like to by pass it.
Could someone please guied me.
Thanks
 
In the event where the error acure, create error trup (you might have it), in
the error part add a criteria that if it's a certain error number to skip the
error message

Sub SubName()
On Error GoTo SubName_Err

' Your code

Exit Sub
SubName_Err:
If Err <> YourErrorNumber Then
MsgBox Error
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top