Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


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

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.

 

 

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