VBC09301 — Ambiguous name detected
Severity: Error · Family: VBC (static semantics / abstract syntax tree) ·
Source metadata: VBCompileErrorInfo
An identifier names more than one declaration at the same level of scope, so it has to be qualified.
MS-VBA reports the same error: Ambiguous name detected.
This code is raised by ScopeTreeSymbolResolver, and by DeclarationStaticSemanticsEvaluator for a module that declares a name twice (recorded in Excel: MS-VBA reports it whatever the two declarations are).
How it is raised
| Situation | Example | Resolution |
|---|---|---|
| Two projects or modules that the code can see declare the same name. | Total declared as a public variable in two referenced libraries |
Qualify the name with the module or project that declares it: Lib1.Total. |
| A module declares a name twice, as the same kind of thing or not. | Public Total As Long and Public Sub Total(); two Sub Main; two Type Point |
Rename or remove one. |
See also
⏮️ VBC00055 Only comments may appear after End Sub, End Function, or End Property | ⏭️ VBC09302 Variable not defined
ACCUEIL • HOME | ℹ️ BIENVENUE • WELCOME | 🧩 BÂTISSONS • BUILD | RD-VBAL | SDK | 🌐 rubberduckvba.ca