Error Function Example

This example uses the Error function to print error messages that correspond to the specified error numbers.

Dim ErrorNumber
For ErrorNumber = 61 To 64    ' Loop through values 61 - 64.
    Debug.Print Error(ErrorNumber)    ' Print error to Immediate window.
Next ErrorNumber