Answers for "vba redim preserve"

VBA
1

vba redim preserve

Dim MyArray() As String
ReDim MyArray(1)
MyArray(0) = "zero"
MyArray(1) = "one"

ReDim Preserve MyArray(2)
MyArray(2) = "two"
MsgBox MyArray(0) & " " & MyArray(1) & " " & MyArray(2)
Posted by: Guest on March-07-2021
0

vba redim

' Used at the procedure level to reallocate storage space for dynamic array variables.
' Example

Dim arr() as Long
ReDim ar() 'creates new array "ar" - "ReDim ar()" acts like "Dim ar()"
Posted by: Guest on December-10-2020

Code answers related to "VBA"

Browse Popular Code Answers by Language