by Djafer Demiraslan (1 Submission)
Category: String Manipulation
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Originally Published: Sat 16th March 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Create a VB Error Message Reference List
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.