Table of Contents

RDC11024: Implements in a document module

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

A document module has an Implements directive. The specification says it cannot have one, and MS-VBA compiles it all the same.

A document module is the code of a host's document, which extends the module the host has for it: in the specification's words, an extension module of an extensible module (MS-VBAL §4.2.1), and "an implements-directive cannot occur within an extension module" (MS-VBAL §5.2.4.2). In Excel, a worksheet's module that implements a class of the project compiles, and a call through the interface runs it (recorded in Excel 16).

RD-VBA does as MS-VBA does: the directive is checked as any class module's, and this warning stands for what the specification says.

How it is raised

Situation Example Resolution
An Implements directive in a document module. Implements IGridView in GameSheet Implement the interface in a class that holds the document instead (RDC01005).

See also


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