there is a Redim sttatement in VBA.
The ReDim statement is used to size or resize a dynamic array that has
already been formally declared using a Private, Public, or Dim statement with
empty parentheses (without dimension subscripts).
You can use the ReDim statement repeatedly to change the number of elements
and dimensions in an array. However, you can't declare an array of one data
type and later use ReDim to change the array to another data type, unless the
array is contained in a Variant. If the array is contained in a Variant, the
type of the elements can be changed using an As type clause, unless youre
using the Preserve keyword, in which case, no changes of data type are
permitted.
If you use the Preserve keyword, you can resize only the last array
dimension and you can't change the number of dimensions at all. For example,
if your array has only one dimension, you can resize that dimension because
it is the last and only dimension. However, if your array has two or more
dimensions, you can change the size of only the last dimension and still
preserve the contents of the array. The following example shows how you can
increase the size of the last dimension of a dynamic array without erasing
any existing data contained in the array.
ReDim X(10, 10, 10)
.. . .
ReDim Preserve X(10, 10, 15)
"Fredriksson via OfficeKB.com" wrote:
How do I declare an array where I know the Number of Columns but the number
of rows is Dynamic The Columns should be type text
--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200703/1