Table of Contents

VBC09357 — Array already dimensioned

Severity: Error  ·  Family: VBC (static semantics / abstract syntax tree)  ·  Source metadata: VBCompileErrorInfo

An array declared with fixed dimensions is given others.

An array declared with its dimensions (Dim a(2) As Long) keeps them: only one declared without (Dim a() As Long) can be given dimensions with ReDim.

MS-VBA reports the same error, with the same message (recorded in Excel).

This code is raised by StatementStaticSemanticsEvaluator.

How it is raised

Situation Example Resolution
A ReDim of a fixed-size array. Dim a(2) As Long … ReDim a(5) Declare the array without dimensions: Dim a() As Long.

See also


⏮️ VBC09356 Wrong number of dimensions | ⏭️ VBC09358 For control variable already in use


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