Hello,
Sorry to unearth this old thread.

Originally Posted by
DCSwearingen
For some reason I thought there was a VBA routine that would return the list to an Excel sheet
Indeed there is a way in Excel to programmatically retrieve a listing of all VBA built-in runtime errors that are available on your platform. For example, you can paste the code below in a module of an empty workbook (successfully tested in Excel 2007).
Note that I parse error codes from 1 to 1000 (see variable MaxErrNo): that’s because, in my Excel 2007, the highest built-in error code is 746. But you can actually parse the error codes up to 65535 (see the link already posted by VBA Noob), it will just take longer to execute the macro.
Private WS As Worksheet
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Gets all the built-in runtime Errors: codes and descriptions
' Outputs them in the 1st Worksheet
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Public Sub GetErrorList()
' clear and initiate the output worksheet
Set WS = ThisWorkbook.Sheets(1)
WS.Cells.Clear
Output 1, "Error Number", "Error Description"
' get the message for user-defined errors
Dim UDErrNo As Integer: UDErrNo = 95
Dim UDErrMsg As String
On Error Resume Next
Err.Raise UDErrNo
UDErrMsg = Err.Description
On Error GoTo 0
' test all error numbers and keep built-in errors
Dim ErrNo As Long, MaxErrNo As Long
Dim ErrMsg As String
Dim Row As Long: Row = 2
'MaxErrNo = 2 ^ 16 - 1 ' 65535
MaxErrNo = 1000
For ErrNo = 1 To MaxErrNo
On Error Resume Next
Err.Raise ErrNo
ErrMsg = Err.Description
On Error GoTo 0 ' clears Err object
If ErrMsg <> UDErrMsg Or ErrNo = UDErrNo Then
Output Row, ErrNo, ErrMsg
Row = Row + 1
End If
Next ErrNo
MsgBox (Row - 1) & " built-in errors found"
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Writes the specified error code and description respectively
' in 1st and 2nd columns of the specified row
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private Sub Output(Row As Long, ErrNo, ErrMsg As String)
If WS Is Nothing Then Exit Sub
With WS
.Cells(Row, 1) = ErrNo
.Cells(Row, 2) = ErrMsg
End With
End Sub
Of course this could be improved by handling unexpected errors, adding a button on the 1st worksheet, displaying progress, storing the error codes and descriptions in a Dictionary object, etc.
Bookmarks