Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Following on from my earlier query about storing an array which itself
contains further arrays I have figured out how to do it (and reinvented a wheel no doubt!) I can simply assign into a holderArray the individual subArrays bfore filing in a Name. My query relates to how VBA treats the first subArray differently from subsequent ones. I assign the subArray(with four elements) into index one of holderArray(which is redimmed to have just one element holderArray(1)=subArray_1 e.g. {Tom, is, new, std} Once this has been stored in a Name and recovered by assignment to a variant the Ubound(variant) is 4. These correspond to the 4 elements of subArray_1. i.e.{Tom, is, new, std} subArrays added subsequently are treated differently; when I add another subArray(with four elements {Fred, was, old, std}) to the holderArray and store in a Name and recover it to a variant, the Ubound(variant) is 2! These correspond to subArray_1 and subArray_2. i.e. {subArray_1,subArray_2} Tom Fred is was new old std std In other words, the "orientation" of subArray_1 when it is the sole subArray in holderArray is "rotated" relative that that it (and all other subArrays) has when more than one subArray is stored in holderArray. My question then is how can I force the orientation of the first subArray to be consistent with that of subsequent ones? I guess I'm looking for something like the worksheet TRANSPOSE? Apologies for the duff example; the real thing is too convoluted to impose on the group. Thanks in advance for yr suggestions (and to Peter T for his response to previous posting) Matthew |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pagesetup.Orientation need VBA routine to "Best Guess" Orientation | Excel Discussion (Misc queries) | |||
"Type mismatch" when I try to fill an Array variable with "+" | Excel Discussion (Misc queries) | |||
How do I use "offset" function in "array formula"? | Excel Discussion (Misc queries) | |||
Creating small "recordset" or sorting a numeric 1-dim array | Excel Programming | |||
"Small" Multi-Dimensional Array Slow Writing To Cell | Excel Programming |