Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Error list! 1

Status
Not open for further replies.

moroeh

Programmer
Oct 22, 2001
25
0
0
ES
Hi!

I would like to know if there is a list, or something like that, where you can see all the error numbers (and their definitions) in vba code.

Thanks,

Igor

 
Lookup "Trappable Errors" in Access Visual Basic Help.

Print the mesages from a VBA module:

Sub PrintErrorMessages()
Dim ErrNum As Long, ErrMsg As String
On Error Resume Next

Debug.Print "---------------------------------------"
Debug.Print "Start Error Message Print"

For ErrNum = 1 To 1000
ErrMsg = Error(ErrNum)
If Err.Number > 0 Or ErrMsg = "Application-defined or object-defined error" Then
Else
Debug.Print CStr(ErrNum) & ": " & ErrMsg
End If
Next ErrNum

Debug.Print "---------------------------------------"
Debug.Print "Finished Error Message Print"
End Sub
Terry L. Broadbent - Salt Lake City, UT
Home of the 2002 Winter Olympics (Feb 8-24)
 
Thanks,

Moroeh

P.D.
Have a good Olympic games
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top