Microsoft KB Archive/136250

= How To Determine Visual Basic Trappable Errors =

Article ID: 136250

Article Last Modified on 7/1/2004

-

APPLIES TO


 * Microsoft Visual Basic 4.0 Standard Edition
 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 Professional Edition
 * Microsoft Visual Basic 4.0 16-bit Enterprise Edition
 * Microsoft Visual Basic 4.0 32-Bit Enterprise Edition
 * Microsoft Visual Basic 5.0 Learning Edition
 * Microsoft Visual Basic 6.0 Learning Edition
 * Microsoft Visual Basic 5.0 Professional Edition
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 5.0 Enterprise Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q136250



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 Visual Basic, 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+G to activate the debug window. Enter the following statement and wait for the error message to appear:

Error  For example, type Error 70 and the following error message appears:

Run-time error '70':

Permission denied

 Press the F1 key to get information from online Help on that specific error.

For example, in Visual Basic 4.0, pressing F1 on Error 70 displays the Permission denied (Error 70) page from Visual Basic Help.

In Visual Basic 6.0, pressing F1 on Error 70 displays the Permission denied (Error 70) page from the Visual Basic for Applications Reference.

If the error description is: Application-defined or object-defined error, then the error number does not correspond to an error defined by Visual Basic for Applications (VBA). Such errors may be defined by the host application (for example, Microsoft Excel or Visual Basic), but if you want to generate them from code, you must use the Raise method, and fill in all relevant arguments.

<div class="references_section">