I'm trying to write a macro that builds a few small tables from a larger one, and I'm using arrays to store the small tables until I'm ready to output. The issue that I'd like to resolve is in the declaration of these arrays. The larger table that I use contains a variable number of records, and each record has a variable number of rows associated with it, from 2 to 4. So the table could look like this:
Item1 Item2 Item3 Item4 Item5
Record1 A A A A A
B B B B B
Record2 A A A A A
B B B B B
C C C C C
D D D D D
Record3 A A A A A
B B B B B
C C C C C
Record4 A A A A A
B B B B B
Record5 A A A A A
B B B B B
C C C C C
D D D D D
My smaller tables won't care about how many rows there are for each record, just how many records. So, I've got code that will determine the number of records and everything, but I can't seem to find a way to declare an array based on that variable. It only works if I hard-code the values.
Anyone know of any work-arounds for this? Public declarations? Is there a way to ReDim a constant, and use that maybe?
Thanks
Bookmarks