John,
Try something like the following:
Dim N As Long
Dim Arr() As String
N = 24
ReDim Arr(N)
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"John Brown" wrote in
message
...
Is there any way of declaring an array without putting a fixed
number? For example say I have the following
Dim number As Integer
number = 24
Dim array(number) As String.....
I need to do this because the size of the array varies
depending on how many elements I bring in from a file. Sometimes
I have 100 sometimes 40 ... is there any way to do this with
VB?
Thanks in advance.