To print a listing of the Error Code descriptions to the Immediate Window, pass it to the Debug.Print
function:
Private Sub ListErrCodes()
Debug.Print "List Error Code Descriptions"
For i = 0 To 65535
e = Error(i)
If e <> "Application-defined or object-defined error" Then Debug.Print i & ": " & e
Next i
End Sub
You can show the Immediate Window by: