Consulting

Results 1 to 5 of 5

Thread: Array of references

  1. #1

    Array of references

    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!

  2. #2
    Administrator
    2nd VP-Knowledge Base
    VBAX Master malik641's Avatar
    Joined
    Jul 2005
    Location
    Florida baby!
    Posts
    1,533
    Location
    Hey Mambo,

    Check out this post in ozgrid. I like the method of the last post.




    New to the forum? Check out our Introductions section to get to know some of the members here. Feel free to tell us a little about yourself as well.

  3. #3
    Quote Originally Posted by malik641
    Check out this post in ozgrid.
    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!

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    aryCol1 = Application.Index(matrix,1,0)

    aryCol2 = Application.Index(matrix,2,0)
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5

    I owe you...

    XLD, Great help from you today!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •