Array of Strings

Z

Zone

I want to set up, for lack of a better term, an array of strings,
evidently a 2-D String array. The number of strings and the number of
characters per string will vary according to conditions. How do I
dimension the array?
Thanks,
James
 
Z

Zone

Thank you, Ardus. However, I did not make clear what I'm trying to do.
I want the array to hold a set of strings for use as a heading row.
Depending on the value of a cell in the selected row, I insert a
heading row before the selected row and put the correct heading above
each cell in the selected row. It seems very inefficient to use code
like

Select Case cells(activecell.row, "a")
Case "Alba"
myArray(1)="Alba Heading A"
myArray(2)="Alba Heading B"

and so on for 26 headings and 25 cases. I was hoping for a simpler
construct. Maybe I'm stuck with this. Any ideas?
Regards,
James
 
D

Dave Peterson

Maybe...

dim myStrings(1 to 3, 1 to 7) as string

(this would result in a 3x7 array (21 elements))
 
Top