I have to care of a error
(eg in the specific case, i need to give a msgbox to the user saying that "Device is not present"
The error is number 68 ("Device not present"
How can i handle with this?
'your code. If an error occurs it will drop into your error 'label below
Exit Sub
MyErrorHandler:
If err.Number = 68 Then
'Do stuff to handle error
msgbox "Device not present",vbcritical,"Device not found"
else
'do stuff to handle error or alert user
msgbox err.number & " " & err.description & " " & err.source
End if
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.