ReDim declarations




Excerpt from the Excel VBA help:

If a variable has not been formally declared using a "Private", "Public" or "Dim" statement,
the ReDim statement acts like a declaration statement.

If another variable with the same name is created later and it has a wider scope,
ReDim would refer to the most recently created variable and not necessarily cause
a compilation error, even if "Option Explicit" was included.

--------------------------------------------------------------------------------------------------------------------------------
To avoid such conflicts "ReDim" should NOT be used as a declaration statement,
but only for redimensioning arrays.
--------------------------------------------------------------------------------------------------------------------------------

For this reason, CrunchCode does not process projects in which variables are defined
ONLY by a "ReDim" statement. The necessary clarity is no longer given.

The listed data fields within each procedure are defined ONLY by a "ReDim" statement.

The variables must be declared using "Private", "Public", or "Dim" statements.