Table of Contents

RDC11033: Reserved name that MS-VBA accepts

Severity: Warning  ·  Family: RDC (Rubberduck Core analyzers)  ·  Raised by: DeclarationNameDivergenceAnalyzer

A declaration has a name that the specification reserves, and MS-VBA compiles it all the same.

A declaration is named with an identifier that is not a reserved identifier (MS-VBAL §3.3.5.2 Reserved Identifiers and IDENTIFIER). Date, DoEvents and CDec are reserved names, so no Enum member can have them. MS-VBA compiles an Enum member with one of these names (observed in Excel), where it refuses every other reserved name.

RD-VBA does as MS-VBA does: the member is declared, and this warning says that the specification reserves the name.

How it is raised

Situation Example Resolution
An Enum member named Date, DoEvents or CDec. Private Enum Field ... Date ... End Enum Give the member another name, such as DateField.

A name written in brackets ([Date]) is a foreign name (MS-VBAL §3.3.5.3), which the specification allows, and is not reported.

See also


ACCUEIL • HOME | ℹ️ BIENVENUE • WELCOME | 🧩 BÂTISSONS • BUILD | RD-VBAL | SDK | 🌐 rubberduckvba.ca