[ACCEPTED]-Array already dimensioned - Class module-ms-word

Accepted answer
Score: 11
Private Paragraphs(0) As ...

This is not an empty array, rather it is 3 a fixed length array with 1 element.

For a dynamic array - one you 2 will later redimension - just declare it 1 as:

Private Paragraphs() As ...
Score: 4
Dim numbers(10) As Integer
MsgBox (UBound(numbers))
ReDim numbers(4)
MsgBox (UBound(numbers))

Above code will throw array-already-dimensioned.
we 1 can do like

ReDim numbers(10) As Integer
MsgBox (UBound(numbers))
ReDim numbers(4)
MsgBox (UBound(numbers))

More Related questions