List of VBA Error Codes

CodeMessage
NAAutomation error: The object invoked has been disconnected from its clients
NAaCode execution has been interrupted
NACompile error: User-defined type not defined
0No error
3Return without GoSub (obsolete, no longer used)
5Procedure call or argument is not valid (Visual Basic)
6 Overflow(Visual Basic Error)
6 Overflow (Visual Basic Run-Time Error)
7Out of memory (Visual Basic Compiler Error)
7Out of memory (Visual Basic Run-Time Error)
9Subscript out of range (Visual Basic)
10This array is fixed or temporarily locked (Visual Basic)
11Division by zero (Visual Basic Run-Time Error)
13Type mismatch (Visual Basic)
14Out of string space (Visual Basic)
16Expression too complex
17Can't perform requested operation (Visual Basic)
18User interrupt occurred
20Resume without error
28Out of stack space
35Sub or function not defined
47Too many DLL application clients
48Error loading DLL
49Bad DLL calling convention
51Internal error (Visual Basic)
52Bad file name or number
53File not found (Visual Basic Run-Time Error)
54Bad file mode
55File already open
57Device I/O error
58File already exists
59Bad record length
61Disk full (Visual Basic)
62Input past end of file
63Bad record number
67Too many files
68Device unavailable
70Permission denied (Visual Basic)
71Disk not ready
74Cannot rename with different drive
75Path/File access error
76Path not found
91Object variable or With block variable not set
92For loop not initialized (Visual Basic)
93Invalid pattern string
94Invalid use of Null (obsolete, no longer used)
95Application-defined or object-defined error
96Unable to sink events of object because the object is already firing events to the maximum number of event receivers it supports
97Cannot call friend function on object which is not an instance of defining class
98A property or method call cannot include a reference to a private object, either as an argument or as a return value
100Class '' does not implement the System.Collections.ICollection interface
298System resource or DLL could not be loaded
320Cannot use character device names in specified file names
321File format not valid
322Can't create necessary temporary file
325Format not valid in resource file
327Data value named not found
328Illegal parameter; can't write arrays
335Could not access system registry
336ActiveX component not correctly registered
337ActiveX Component not found
338ActiveX Component did not run correctly
360Object already loaded
361Can't load or unload this object
363ActiveX Control specified not found
364Object was unloaded
365Unable to unload within this context
368The specified file is out of date
371The specified object can't be used as an owner form for Show
380Property value is not valid
381Property array index is not valid
382Set not supported at run time
383Set not supported (read-only property)
385Need property array index
387Set not permitted
393Get not supported at run time
394Get not supported (write-only property)
400Form already displayed; can't show modally
402Code must close topmost modal form first
422Property not found
423Property or method not found
424Object required (Visual Basic)
429Cannot create ActiveX Component
430Class does not support Automation or does not support expected interface
432File name or class name not found during Automation operation (Visual Basic)
438Object doesn't support this property or method (Visual Basic)
440Automation error
442Connection to type library or object library for remote process has been lost
443Automation object does not have a default value
445Object doesn't support this action (Visual Basic)
446Object doesn't support named arguments
447Object doesn't support current locale setting (Visual Basic)
448Named argument not found (Visual Basic)
449Argument not optional (Visual Basic)
450Wrong number of arguments or property assignment not valid
451Property let procedure not defined and property get procedure did not return an object
452Ordinal is not valid
453Specified DLL function not found
454Code resource not found
455Code resource lock error
457This key is already associated with an element of this collection
458Variable uses an Automation type not supported in Visual Basic
459Object or class does not support the set of events
460Clipboard format is not valid
461Method or data member not found
462The remote server machine does not exist or is unavailable (Visual Basic)
463Class not registered on local machine
481Picture is not valid
482Printer error
735Cannot save file to TEMP
744Search text not found
746Replacements too long
999Stop statement encountered
32768Feature not yet implemented

Interested in learning new skills?