Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to handle the VB errors on run time ?
Message
 
To
27/12/1999 07:58:52
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00308725
Message ID:
00309112
Views:
29
>While running the application (after making setup) How can I find
>the error of the form/proc name, line no, error message.
>
>Actually when i was running the application, the following error
>no. appeared for some user machine.
>
>"Class doesn't support Automation (Error 430)"
>
>for the info. in my app. i have used ADO object only no other custom class/Dll.

Line number will be hard to obtain on the first pass. But you can find the line using this method.

First, in each of your sub/function, handle your errors this way.

Private Sub MySub()
On Error Goto EH

'Put your code here

EH:
MsgBox "An error occured in sub MySub." & _
vbcrlf & vbcrlf & _
err.number & " - " & err.description
End Sub

Once you will know in which sub/function the error occurs, you will be able to display a couple of msgbox to find the particular line on which the error occurs.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform