Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: Visual Basic
Expertise: Beginner
Feb 14, 2002



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Create a VB Error Message Reference List

Have you ever wanted to have a hard copy listing all the VB error messages? Create a new standard EXE VB application and drop this code into the Load event of the main form:
Private Sub Form_Load()
Dim i As Integer
For i = 0 To 32000
'Use this test in VB3:
'If Error$(i) <> _
"User-defined error" Then
'Use this test in VB4 and later:
If Error$(i) <> "Application-defined " _
& "or object-defined error" Then
Printer.Print i, Error$(i)
End If
Next iEnd Sub

This program prints all defined error descriptions. All undefined error descriptions return "Application-defined" or "object-defined error" (or "User-defined error" in VB3), so you check for these and ignore them.
Vince A.
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date