List of VBScript errors

From StealthBot Wiki Backup
(Redirected from List of errors)
Jump to: navigation, search

Here is a list of all VBScript errors relating to built-in functions and tips to fix them. Objects can raise other error messages not mentioned here.

Contents

Parsing errors

These are the possible parsing errors that can occur.

Error 1001

Description: Out of Memory

Error 1002

Description: Syntax error

Error 1003

Description: Expected ':'

Error 1005

Description: Expected '('

You are missing parentheses around the parameters of a property, function, or subroutine, or around the upper bound value in a ReDim statement.

Error 1006

Description: Expected ')'

You are missing the closing parentheses for some line of code.

Error 1007

Description: Expected ']'

You are missing the closing square bracket for some bracketted identifier.

Error 1010

Description: Expected identifier

Error 1011

Description: Expected '='

You forgot the = operator in a Set assignment statement. The format is Set variable = object expression.

Error 1012

Description: Expected 'If'

Error 1013

Description: Expected 'To'

Error 1014

Description: Expected 'End'

Error 1015

Description: Expected 'Function'

Error 1016

Description: Expected 'Sub'

Error 1017

Description: Expected 'Then'

Error 1018

Description: Expected 'Wend'

Error 1019

Description: Expected 'Loop'

Error 1020

Description: Expected 'Next'

Error 1021

Description: Expected 'Case'

You have a Select block with a missing Case keyword after the Select keyword. The format is Select Case expression.

Error 1022

Description: Expected 'Select'

Error 1023

Description: Expected expression

Error 1024

Description: Expected statement

Error 1025

Description: Expected end of statement

Error 1026

Description: Expected integer constant

Error 1027

Description: Expected 'While' or 'Until'

Error 1028

Description: Expected 'While,' 'Until,' or end of statement

Error 1029

Description: Expected 'With'

Error 1030

Description: Identifier too long

Error 1031

Description: Invalid number

Error 1032

Description: Invalid character

Error 1033

Description: Unterminated string constant

Error 1034

Description: Unterminated comment

Error 1037

Description: Invalid use of 'Me' keyword

Error 1038

Description: 'loop' without 'do'

Error 1039

Description: Invalid 'exit' statement

Error 1040

Description: Invalid 'for' loop control variable

Error 1041

Description: Name redefined

Error 1042

Description: Must be first statement on the line

Error 1043

Description: Cannot assign to non-ByVal argument

Error 1044

Description: Cannot use parentheses when calling a Sub

To call a subroutine, you have two methods: one without the parentheses around the arguments, and one with them (requires the Call keyword).

Error 1045

Description: Expected literal constant

Error 1046

Description: Expected 'In'

Error 1047

Description: Expected 'Class'

Error 1048

Description: Must be defined inside a Class

Error 1049

Description: Expected Let or Set or Get in property declaration

Error 1050

Description: Expected 'Property'

Error 1051

Description: Number of arguments must be consistent across properties specification

Error 1052

Description: Cannot have multiple default property/method in a Class

You defined multiple properties and/or methods as Default in this class. There can only be one.

Error 1053

Description: Class initialize or terminate do not have arguments

The two class events cannot have arguments. Remove them. To pass a value to an object on creation, you have to call another function.

I recommend making a separate function called "Init" and passing the initializing arguments to that. ~Ribose

Error 1054

Description: Property Set or Let must have at least one argument

Error 1055

Description: Unexpected 'Next'

Error 1056

Description: 'Default' can be specified only on 'Property' or 'Function' or 'Sub'

Error 1057

Description: 'Default' specification must also specify 'Public'

Default members must be publicly accessible. Change Private Default to Public Default.

Error 1058

Description: 'Default' specification can only be on Property Get

You defined a Property Let or Property Set as default. Default properties are a value you get.

Run-time errors

These are the possible run-time errors that can occur by default. Some objects used in scripting may raise custom run-time errors when something goes wrong involving them.

Error 5

Description: Invalid procedure call or argument

Error 6

Description: Overflow

Error 7

Description: Out of Memory

Error 9

Description: Subscript out of range

Error 10

Description: This array is fixed or temporarily locked

Error 11

Description: Division by zero

This occurs when the right operand of a division operation is equal to zero. Check variables or functions being passed to the right of division.

Error 13

Description: Type mismatch

This occurs when two types cannot be compared with the specified operation, or a subroutine was called that could not be found. For example, check to make sure values of type integer (not string) are being compared in > and < operations.

Error 14

Description: Out of string space

Error 17

Description: Can't perform requested operation

Error 28

Description: Out of stack space

Error 35

Description: Sub or function not defined

Error 48

Description: Error in loading DLL

Error 51

Description: Internal error

Error 52

Description: Bad file name or number

Error 53

Description: File not found

Error 54

Description: Bad file mode

Error 55

Description: File already open

Error 57

Description: Device I/O error

Error 58

Description: File already exists

Error 61

Description: Disk full

Error 62

Description: Input past end of file

Error 67

Description: Too many files

Error 68

Description: Device unavailable

Error 70

Description: Permission denied

Error 71

Description: Disk not ready

Error 74

Description: Can't rename with different drive

Error 75

Description: Path/File access error

Error 76

Description: Path not found

Error 91

Description: Object variable not set

Error 92

Description: For loop not initialized

Error 94

Description: Invalid use of Null

Error 322

Description: Can't create necessary temporary file

Error 424

Description: Object required

Error 429

Description: ActiveX component can't create object

Error 430

Description: Class doesn't support Automation

Error 432

Description: File name or class name not found during Automation operation

Error 438

Description: Object doesn't support this property or method

Error 440

Description: Automation error

Error 445

Description: Object doesn't support this action

Error 447

Description: Object doesn't support current locale setting

Error 448

Description: Named argument not found

Error 449

Description: Argument not optional

Error 450

Description: Wrong number of arguments or invalid property assignment

Error 451

Description: Object not a collection

Error 453

Description: Specified DLL function not found

Error 455

Description: Code resource lock error

Error 457

Description: This key is already associated with an element of this collection

Error 458

Description: Variable uses an Automation type not supported in VBScript

Error 462

Description: The remote server machine does not exist or is unavailable

Error 481

Description: Invalid picture

Error 500

Description: Variable is undefined

Error 501

Description: Illegal assignment

Error 502

Description: Object not safe for scripting

Error 503

Description: Object not safe for initializing

Error 504

Description: Object not safe for creating

Error 505

Description: Invalid or unqualified reference

Error 506

Description: Class not defined

Error 507

Description: An exception occurred

Error 4096

Description: Microsoft VBScript compilation error

Error 4097

Description: Microsoft VBScript runtime error

Error 5016

Description: Regular Expression object expected

Error 5017

Description: Syntax error in regular expression

Error 5018

Description: Unexpected quantifier

Error 5019

Description: Expected ']' in regular expression

Error 5020

Description: Expected ')' in regular expression

Error 5021

Description: Invalid range in character set

Error 30000

Description: EN

Error 32766

Description: True

Error 32767

Description: False

Error 32768

Description: OK

Error 32769

Description: Cancel

Error 32770

Description: Help

Error 32811

Description: Element not found

Error 32811

Description: The specified date is not available in the current locale's calendar

See also