Table of Contents

Enum VBCompileErrorId

Namespace
RDCore.SDK.Model.Errors
Assembly
RDCore.SDK.dll

Formally encodes a range of integer values for all VBSyntaxErrorInfo and VBCompileErrorInfo errors.

public enum VBCompileErrorId

Fields

AmbiguousName = 9301

An identifier conflicts with another identifier or requires qualification.
learn.microsoft.com

ArgumentRequiredForPropertyLetOrSet = 9321

A Property Let or Property Set procedure declares no parameters at all - it has no value parameter to receive the value being assigned.
MS-VBAL §5.3.1.5: property-parameters = "(" [parameter-list ","] value-param ")" - value-param is never bracketed, so it is always mandatory.

ℹ️ Unable to find an official learn.microsoft.com documentation link for this error.

ByValArgumentNotAllowed = 9327

An argument is written with the ByVal keyword in an argument list that is not that of an invocation of an external procedure.
MS-VBAL §5.6.13.1 Argument Lists.

DuplicateDeclaration = 9303

The specified name is already used at this level of scope.
learn.microsoft.com

DuplicateLabelDefinition = 9319

A procedure declaration contains more than one statement label definition with the same label value.
MS-VBAL §5.4.1.1 Statement Labels.

ℹ️ Unable to find an official learn.microsoft.com documentation link for this error.

EventArgumentsIncompatible = 9323

The arguments of a RaiseEvent statement are not compatible with the parameter list of the event it raises: there are too many or too few, or one cannot be passed to its parameter.
MS-VBAL §5.4.2.20 RaiseEvent Statement.

EventNotDefined = 9322

A RaiseEvent statement names an event that the class module it is written in does not declare, or is not written in a class module at all.
MS-VBAL §5.4.2.20 RaiseEvent Statement.

ExitDoNotWithinDoLoop = 9312

Exit Do is only valid within a Do...Loop statement.
learn.microsoft.com

ExitForNotWithinForNext = 9313

Exit For is only valid with a For...Next statement.
learn.microsoft.com

ExitFunctionNotAllowedInSubOrProperty = 9314

Exit statement must match the kind of procedure in which it occurs.
learn.microsoft.com

👉 Here "Property" must be read as Property Let or Property Set, because in MS-VBA Exit Function can legally exist inside a Property Get procedure (VBIDE accepts and corrects it)

ExitPropertyNotAllowedInSubOrFunction = 9315

Exit statement must match the kind of procedure in which it occurs.
learn.microsoft.com

ExitSubNotAllowedInFunctionOrProperty = 9332

Exit Sub is only valid within a Sub: the Exit statement must match the kind of procedure in which it occurs.
learn.microsoft.com

ExpectedArray = 9307

A variable name with a subscript indicates the variale is a VBArrayValue.
learn.microsoft.com

ExpectedIdentifier = 9308

Syntax specifies an identifier name in this context, but none was supplied.

ℹ️ Unable to find an official learn.microsoft.com documentation link for this error.

FileAccessNotValidForMode = 9334

The Access clause of an Open statement is not one its For mode allows: Output is only Write, Input only Read, and Append is Read Write or Write.

👉 MS-VBAL §5.4.5.1 states the rule and names no error: the message is the platform's.

ForbiddenWithOptionStrict = 8000

An Option Strict directive or annotation is enforcing stricter semantics that block a number of semantic flags at compile-time:

ℹ️ This is a specified error code, not (yet) a language feature.
The VB.NET Option Strict statement (RD-VBA: "directive") is documented as follows:
🎯 Restricts implicit data type conversions to only widening conversions, disallows late binding, and disallows implicit typing that results in an Object type.
learn.microsoft.com

InconsistentPropertyAccessors = 9320

A Property Get, Property Let, and Property Set sharing a name declare incompatible index-parameter lists, or a property procedure with an Optional parameter or a ParamArray shares its name with another accessor, or a Property Set's value parameter is not typed Object, Variant, or a named class.
MS-VBAL §5.3.1.7 Property Declarations.

ℹ️ The real VBE bundles all three conditions into one message: "Definitions of property procedures for the same property are inconsistent, or property procedure has an optional parameter, a ParamArray, or an invalid Set final parameter." Only the first (index-parameter equivalence) and third (Set's value type) are literal MS-VBAL static-semantics bullets; the Optional/ParamArray-implies-Get-only consequence is not spelled out verbatim in the spec text, but is confirmed by the real compiler's own error wording.

InterfaceMemberNotImplemented = 9329

A class module that implements an interface does not declare the implemented name that corresponds to one of the interface's public variables or methods.
MS-VBAL §5.2.4.2 Implements Directive.

InvalidEventHandler = 9326

A procedure named for a WithEvents variable and one of the events of its class is not a valid handler of the event: it is not a subroutine, or its parameter list is not compatible with the event's.
MS-VBAL §5.3.1.8 Event Handler Declarations.

InvalidEventName = 9325

The name of an Event declaration contains an underscore, which is what separates the name of a WithEvents variable from the name of the event in the name of a handler.
MS-VBAL §5.2.4.3 Event Declaration.

InvalidImplementedMember = 9330

A procedure named for an interface member (InterfaceName_MemberName) does not correspond to it: it is not the kind of declaration the member needs, or its parameters or its type are not equivalent to the member's.
MS-VBAL §5.3.1.9 Implemented Name Declarations.

InvalidImplementsDirective = 9328

An Implements directive names a class that cannot be an interface class: the class module itself, a class another directive of the module already names, one whose public members have an underscore in their names, or one whose name collides with another interface's; or two interfaces have names one of which begins with the other followed by an underscore.
MS-VBAL §5.2.4.2 Implements Directive.

InvalidParamArrayUse = 9305

The parameter defined as a ParamArray is used incorrectly in the procedure.
learn.microsoft.com

InvalidReDim = 9306

Not every VBArrayValue can be redimensioned.
learn.microsoft.com

InvalidUseOfMe = 9317

An instance expression (Me) is invalid outside a class module.
MS-VBAL 5.6.11 Instance Expressions.

InvalidUseOfObject = 9304

You tried to use an object in an incorrect way.
learn.microsoft.com

InvalidWithEventsType = 9324

A WithEvents variable is not declared as a specific class that has at least one event, or is declared as the class of the module that contains it.
MS-VBAL §5.2.3.1.2 WithEvents Variable Declarations.

LabelNotDefined = 9309

A line label or line number is referred to (for example in a GoTo statement), but doesn't occur within the scope of the reference.
learn.microsoft.com

MethodOrDataMemberNotFound = 9316

The collection, object, or user-defined type (UDT) doesn't contain the referenced member.
learn.microsoft.com

ℹ️ The learn.microsoft.com documentation documents this error as both a compile-time and a MethodOrDataMemberNotFound error.
This works only because the documentation includes run-time collection item retrieval - otherwise this error would be purely about a failed member binding.

NumericLiteralOverflow = 42

A numeric literal's value falls outside the range of its type: a decimal literal that overflows its type-declaration suffix (99999%), an unsuffixed integer or floating-point literal that overflows to infinity, or an unsuffixed &H… / &O… radix literal past 32 bits. See MS-VBAL §3.3.2.

SubOrFunctionNotDefined = 9331

The code calls a procedure, or uses a statement, that the language it is written in does not have: Print "x" in a language where a bare Print is the member of a form there is none of, or a symbol only another language's library declares.
learn.microsoft.com

SyntaxError = 1

A generic "Syntax error" compile-time error.
learn.microsoft.com

👉 RDCore.Parsing should be giving us much more detailed syntax errors that this.

TypeMismatch = 9310

The variable or property is of a data type that cannot be let-coerced (implicitly converted) to the specified destination type.
learn.microsoft.com

ℹ️ The learn.microsoft.com documentation documents this error as both a compile-time and a TypeMismatch error. Since both compile-time and run-time semantics are closely related, this does make sense.

UnspecifiedCompileError = 0

A fallback error ID for a compilation error.

⚠️ This value may not reliably be interpreted as a valid compilation error ID.

UserDefinedTypeNotDefined = 9311

The data type of a variable or parameter declaration is of an unknown, inaccessible, or otherwise invalid data type.
learn.microsoft.com

👉 This error usually has absolutely nothing to do with any user-defined type (UDT) declaration. The term "user-defined" here seems to be rather standing for workspace-defined.

VariableNotDefined = 9302

You use the Option Explicit directive to protect your modules from having undeclared variables and to eliminate the possibility of inadvertently creating new variables when typographical errors occur.
learn.microsoft.com

VariableRequired = 9333

An expression that is not a variable is where a variable is required: the target of a Mid statement, the variable a Line Input #, Input # or Get statement reads into.
learn.microsoft.com

WithExpressionOutsideWithBlock = 9318

A with-expression (.member or !member) appears where there is no enclosing With block to supply its implicit owner.
MS-VBAL §5.6.15 With Expressions.

ℹ️ Unable to find an official learn.microsoft.com documentation link for this error.

Remarks

👉 The members of this enum are divided into sections.

  • 0 to 1: Generic system or fallback defaults.
  • 2 to 41: Reserved
  • 42 to 999: Reserved for RD-VBA formalized syntax errors (VBSyntaxErrorInfo).
  • 1000 to 7999: Reserved
  • 8000 to 9299: Reserved for future RD-VBA extensibility.
  • 9300+: Formalized MS-VBA compilation errors. This list is currently vastly incomplete.

ℹ️ 93 is for 1993, the year MS-VBA came into existence.