Article ID: 108340
Article Last Modified on 7/1/2004
APPLIES TO
- Microsoft Visual Basic 3.0 Professional Edition
- Microsoft Visual Basic 3.0 Professional Edition
This article was previously published under Q108340
SUMMARY
This article demonstrates how you can determine if an error you are receiving from a Visual Basic program is a Visual Basic trappable error or if it coming from another source.
MORE INFORMATION
When you run the VB.exe file, follow these steps to get more information on a specific error:
- Stop your program if it is currently running.
- Press the F8 key to go from design mode to break mode.
- Press CTRL+B to activate the debug window.
- Enter the following statement and wait for the error message to appear: Error <error-number>
For example, type Error 70, and the following error message appears: - Press F1 to get information from Help on that specific error.
For example, pressing F1 on Error 70 displays the Permission denied page from the Visual Basic Help.
To generate a list of error messages for Visual Basic 3.0:
- Start a new project in Visual Basic. Form1 is created by default.
- Add a Label control (Label1) and a CommandButton (Command1) to Form1. Set the Label1 Caption property to Status of Error List.
Add the following code to the Click event for Command1:
Dim i As Variant Dim buf As String Label1.Caption = "Error List Started" For i = 1 To &H7FFF If Error$(i) <> "User-defined error" Then buf = buf & Format$(i, "@@@@ ") & Error$(i) & Chr$(13) & Chr$(10) End If Next ClipBoard.Clear ClipBoard.SetText buf Label1.Caption = "Error List Complete"
- On the Run menu, choose Start, or press the F5 key to run the program. Click Command1 and, when the label displays the following error message, then paste the contents of the clipboard into an editor, such as Notepad:
REFERENCES
For additional information on trappable errors for newer versions of Visual Basic, click the article number below to view the article in the Microsoft Knowledge Base:
136250 How To Determine Visual Basic Trappable Errors
Additional query words: 70
Keywords: kbhowto kbref kbdocs KB108340