How do we do a Redim() to declare a global array ?
Printable View
How do we do a Redim() to declare a global array ?
VB Code:
Redim array(0)
0 being the upper bound of the dimension
Sorry, I meant how do I Redim(n) as a global variables in a sub. I have done
VB Code:
global sArray(5) as string Private Sub GetNumber(ArrayNum as integer) Redim sArray(ArrayNum) as string End Sub
sArray seems to be changed to a local variable instead of a global variable.
Thanks.
should beVB Code:
global sArray(5) as string
VB Code:
global sArray() as string
if you want to be able to redim it.