Professional Documents
Culture Documents
VBA Error Codes
VBA Error Codes
2
Excel Bonanza
Your Bonanza for Excel knowledge !
Error Message
Code
3 Return without GoSub.
7 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).
9 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 sheets("Sheet2"), and Sheet2 does not exist.
11 Division by zero.
13 Type mismatch.
18 User interrupt occurred. This error occurs if the user interrupts a macro by pressing the
Cancel key.
20 Resume without error. This error probably indicates that you forgot the Exit Sub statement before
your error handler code.
51 Internal error.
3
Excel Bonanza
Your Bonanza for Excel knowledge !
Error Message(Continued)
Code
Disk full.
61
Device unavailable.
68
70 Permission denied.
97 Cannot call friend function on object that is not an instance of defining class.
98
A property or method call can't include a reference to a private object, either as an argument
or as a return value.
4
Excel Bonanza
Your Bonanza for Excel knowledge !
Error Message(Continued)
Code
424 Object required. This error occurs if text preceding a dot is not recognized as an object.
429
ActiveX component can't create object (might be a registration problem with a library that
you've referenced).
442 Connection to type library or object library for remote process has been lost.
5
Excel Bonanza
Your Bonanza for Excel knowledge !
Error Message(Continued)
Code
6
Excel Bonanza
Your Bonanza for Excel knowledge !
Message(Continued)
Error
Code