How-to: VBScript Error Codes

Runtime and Syntax error codes.

Decimal (hex)  Description
 5 (0x800A0005) Invalid procedure call or argument
 6 (0x800A0006) Overflow
 7 (0x800A0007) Out of memory
 9 (0x800A0009) Subscript out of range
10 (0x800A000A) The Array is of fixed length or temporarily locked
11 (0x800A000B) Division by zero
13 (0x800A000D) Type mismatch
14 (0x800A000E) Out of string space (overflow)
17 (0x800A0011) cannot perform the requested operation
28 (0x800A001C) Stack overflow
35 (0x800A0023) Undefined SUB procedure or Function
48 (0x800A0030) Error loading DLL
51 (0x800A0033) Internal error
52 (0x800A0034) bad file name or number
53 (0x800A0035) File not found
54 (0x800A0036) Bad file mode
55 (0x800A0037) File is already open
57 (0x800A0039) Device I/O error
58 (0x800A003A) File already exists
61 (0x800A003D) Disk space is full
62 (0x800A003E) input beyond the end of the file
67 (0x800A0043) Too many files
68 (0x800A0044) Device not available
70 (0x800A0046) Permission denied
71 (0x800A0047) Disk not ready
74 (0x800A004A) Cannot rename with different drive
75 (0x800A004B) Path/ file access error
76 (0x800A004C) Path not found
91 (0x800A005B) Object variable not set
92 (0x800A005C) For loop is not initialized
94 (0x800A005E) Invalid use of Null 
322 (0x800A0142) Could not create the required temporary file
424 (0x800A01A8) Could not find target object
429 (0x800A01AD) ActiveX cannot create object
430 (0x800A01AE) Class does not support Automation
432 (0x800A01B0) File name or class name not found during Automation operation
438 (0x800A01B6) Object doesn't support this property or method
440 (0x800A01B8) Automation error
445 (0x800A01BD) Object does not support this action
446 (0x800A01BE) Object does not support the named arguments
447 (0x800A01BF) Object does not support the current locale
448 (0x800A01C0) Named argument not found
449 (0x800A01C1) parameters are not optional
450 (0x800A01C2) Wrong number of parameters or invalid property assignment
451 (0x800A01C3) is not a collection of objects
453 (0x800A01C5) The specified DLL function was not found
455 (0x800A01C7) Code resource lock error
457 (0x800A01C9) This key already associated with an element of this collection
458 (0x800A01CA) Variable uses an Automation type not supported in VBScript
462 (0x800A01CE) The remote server does not exist or is not available
481 (0x800A01E1) Image is invalid.
500 (0x800A01F4) variable not defined
501 (0x800A01F5) illegal assignment
502 (0x800A01F6) The object is not safe for scripting
503 (0x800A01F7) Object not safe for initializing
504 (0x800A01F8) Object can not create a secure environment
505 (0x800A01F9) invalid or unqualified reference
506 (0x800A01FA) Class/Type is not defined
507 (0x800A01FB) Unexpected error
1001 (0x800A03E9) Insufficient memory
1002 (0x800A03EA) syntax error
1003 (0x800A03EB) Missing ":"
1005 (0x800A03ED) Missing '('
1006 (0x800A03EE) Missing ')'
1007 (0x800A03EF) Missing "]"
1010 (0x800A03F2) Missing Identifier
1011 (0x800A03F3) Missing = 
1012 (0x800A03F4) Missing 'If'
1013 (0x800A03F5) Missing 'To'
1014 (0x800A03F6) Missing 'End'
1015 (0x800A03F7) Missing 'Function'
1016 (0x800A03F8) Missing 'Sub'
1017 (0x800A03F9) Missing 'Then'
1018 (0x800A03FA) Missing 'Wend'
1019 (0x800A03FB) Missing 'Loop'
1020 (0x800A03FC) Missing 'Next'
1021 (0x800A03FD) Missing 'Case'
1022 (0x800A03FE) Missing 'Select'
1023 (0x800A03FF) Missing expression
1024 (0x800A0400) Missing statement
1025 (0x800A0401) Missing end of statement
1026 (0x800A0402) Requires an integer constant
1027 (0x800A0403) Missing 'While' or 'Until'
1028 (0x800A0404) Missing 'While, 'Until,' or End of statement
1029 (0x800A0405) Too many locals or arguments
1030 (0x800A0406) Identifier Too long
1031 (0x800A0407) The number of is invalid
1032 (0x800A0408) Invalid character
1033 (0x800A0409) Unterminated string constant
1034 (0x800A040A) Unterminated comment
1035 (0x800A040B) Nested comment
1037 (0x800A040D) Invalid use of 'Me' Keyword
1038 (0x800A040E) 'loop' statement is missing 'do'
1039 (0x800A040F) invalid 'exit' statement
1040 (0x800A0410) invalid 'for' loop control variable
1041 (0x800A0411) Name redefined
1042 (0x800A0412) Must be the first statement line
1043 (0x800A0413) Cannot be assigned to non - Byval argument
1044 (0x800A0414) Cannot use parentheses when calling Sub
1045 (0x800A0415) Requires a literal constant
1046 (0x800A0416) Missing 'In'
1047 (0x800A0417) Missing 'Class'
1048 (0x800A0418) Must be inside a class definition
1049 (0x800A0419) Missing Let, Set or Get in the property declaration
1050 (0x800A041A) Missing 'Property'
1051 (0x800A041B) The Number of parameters must be consistent with the attribute description
1052 (0x800A041C) cannot have more than one default attribute / method in a class 
1053 (0x800A041D) Class did not initialize or terminate the process parameters
1054 (0x800A041E) Property Let or Set should have at least one parameter
1055 (0x800A041F) Error at 'Next'
1056 (0x800A0420) 'Default 'can only be in the' Property ',' Function 'or' Sub 'in the designated
1057 (0x800A0421) 'Default' must be 'Public'"
1058 (0x800A0422) Can only specify the Property Get in the 'Default'
5016 (0x800A1398) Requires a regular expression object
5017 (0x800A1399) Regular expression syntax error
5018 (0x800A139A) The number of words error
5019 (0x800A139B) Regular expressions is missing ']'
5020 (0x800A139C) Regular expressions is missing ')'
5021 (0x800A139D) Character set Cross-border
32766 (0x800A7FFE) True
32767 (0x800A7FFF) False
32811 (0x800A802B) Element was not found
32812 The specified date is not available in the current locale's calendar

“Unreasonable haste is the direct road to error” ~ Moliere

Related VBScript commands

On Error - Error handling.
IsNothing - Function to find Null/Empty values.

Copyright © 1999-2023
Some rights reserved