LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default array "orientation" in another array

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pagesetup.Orientation need VBA routine to "Best Guess" Orientation [email protected] Excel Discussion (Misc queries) 3 November 10th 09 05:53 PM
"Type mismatch" when I try to fill an Array variable with "+" [email protected] Excel Discussion (Misc queries) 1 April 17th 07 01:28 PM
How do I use "offset" function in "array formula"? hongguang Excel Discussion (Misc queries) 3 April 4th 07 12:04 AM
Creating small "recordset" or sorting a numeric 1-dim array Anthony Cravero Excel Programming 0 December 19th 03 06:36 PM
"Small" Multi-Dimensional Array Slow Writing To Cell Steve Hieb Excel Programming 2 September 6th 03 03:20 AM


All times are GMT +1. The time now is 11:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"