This Appendix contains a complete listing of the error codes for all trappable errors in Visual Basic for Applications (VBA). This information is useful for error trapping. For complete details, consult Excel’s help system.
Invalid procedure call or argument.
Overflow (for example, value too large for an integer).
Out of memory. This error rarely refers to the amount of physical memory installed on your system. Rather, it usually refers to a fixed-size area of memory used by Excel or Windows (for example, the area used for graphics or custom formats).
Subscript out of range. You will also get this error message if a named item is not found in a collection of objects. For example, if your code refers to
This array is fixed or temporarily locked.
Division by zero.
Out of string space.
Expression too complex.
Can’t perform requested operation.
User interrupt occurred. This error occurs if the user interrupts a macro by pressing the Cancel key.
Resume without error. This error probably indicates that you forgot the
Out of stack space.
Too many Dynamic Link Library (DLL) application clients.
Error in loading DLL.
Bad DLL calling convention.
Bad filename or number.
File not found.
Bad file mode.
File already open.
Device Input/Output (I/O) error. ...