Create a VB Error Message Reference List

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 IntegerFor 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" ThenPrinter.Print i, Error$(i)End IfNext 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.

See also  5 Tips for Working With an Onsite Interpreter

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist