View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\)[_2230_] Rick Rothstein \(MVP - VB\)[_2230_] is offline
external usenet poster
 
Posts: 1
Default need some array help

When you use the Preserve keyword, you can only change the size of the last
dimension. This is discussed in the help files for the ReDim statement.

Rick


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
i want to store an unknown number variables in a 2 dimensional array and
can't figure out how to use redim preserve

here's what i tried

dim arr() as string

redim arr(1 to 1, 1 to 6)

for n = 1 to itemnum.count
ReDim Preserve arr(1 To n, 1 To 6)
then code to add a values
next

on the 2nd loop i always get an error
can someone enlighten me please?
--


Gary