to make an unlimited array?
you usually declare it as:
is there anyway to make the array never ending?Code:dim poo(100) as string
Printable View
to make an unlimited array?
you usually declare it as:
is there anyway to make the array never ending?Code:dim poo(100) as string
Dynamic arrays allow you redimension them until you run out of memory
You are dynamically adding 10000 elements to the arrayCode:dim arr() as Variant
for i=0 to 100000
Redim Preserve arr(i)
arr(i)=
next i
dim a() 'dynamic
then redim when you need to increase the number of elements
redim a(number)
eg.
dim a() as string
redim a(1)
a(0) = "gadfly"
a(1) = "eldritch"
redim preserve a(2) 'use preserve to retain data in the array
a(2) = "popinjay"