PDA

View Full Version : Array of references



MamboKing
06-30-2008, 09:35 AM
I've a Variant matrix and I need a column to contain references (call it pointer or addresses) to other arrays.

That means, each element of that column must reference a different array such that I can access to it very quickly just by reading the content of that column.

I'm very new to VBA.
Would someone please indicate the syntax to me, perhaps with a link to an example?

Thanks!

malik641
06-30-2008, 10:12 AM
Hey Mambo,

Check out this post in ozgrid (http://www.ozgrid.com/forum/showthread.php?t=27737). I like the method of the last post.

MamboKing
06-30-2008, 01:56 PM
Check out this post in ozgrid (http://www.ozgrid.com/forum/showthread.php?t=27737).

Thanks Joseph!

Working on it.

On a similar topic, is it possible to assign the content of a row of a matrix to a unidimensional array without using a For cycle?

Say, matrix(0 To R, 0 To C) and array(0 to C)

Is it possible to assign the value of a row in the matrix to the array?
Again, without assigning one by one in a For cycle?

Thanks!

Bob Phillips
06-30-2008, 03:20 PM
aryCol1 = Application.Index(matrix,1,0)

aryCol2 = Application.Index(matrix,2,0)

MamboKing
06-30-2008, 04:45 PM
XLD, Great help from you today!