Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to handle the VB errors on run time ?
Message
 
À
27/12/1999 07:58:52
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00308725
Message ID:
00309112
Vues:
28
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform