RDC00105 — Implicit Public member
Severity: Information · Family: RDC (Rubberduck Core analyzers) ·
Raised by: ImplicitPublicMemberAnalyzer
A procedure, a property, an event, an Enum, a Type or a Declare states no access modifier.
Such a member is Public (MS-VBAL §5.3.1.1 Procedure Scope): it is part of the interface of the module, and
nothing in the declaration says so. The diagnostic is an opinion of the analyzer and not a condition of the language: both are legal VBA.
A variable of the module level is not among them: a declaration with Dim there is Private (see RDC00202).
That a member states no access modifier is a fact of the way it is written: the analyzer reads it off the syntax tree, and reports the name of the member. It is a suggestion because writing the keyword does not change what the member is.
How it is raised
| Situation | Example | Resolution |
|---|---|---|
| A member of the module states no access modifier. | Sub Work() |
Write Public if the member is meant to be part of the interface of the module, and Private otherwise. |
See also
ACCUEIL • HOME | ℹ️ BIENVENUE • WELCOME | 🧩 BÂTISSONS • BUILD | RD-VBAL | SDK | 🌐 rubberduckvba.ca