+ Reply to Thread
Results 1 to 8 of 8

2 Dimentional Array as Dictionary Item

  1. #1
    Forum Contributor
    Join Date
    02-20-2007
    MS-Off Ver
    2003 & 2007
    Posts
    299

    2 Dimentional Array as Dictionary Item

    I've built a dictionary that contains an array for the item, that array contains a 2-dimentional array within it. How can I read the items from the 2-dimentional array?

    here is code that loads dictionary, yArray is 2-Dimentional:
    Please Login or Register  to view this content.

    This code attempt to view the dictionary items. It works to retrieve the 1st value of the item array, which is x, but errors on the next loop. I don't know how to loop through the yArray and print those values.
    Please Login or Register  to view this content.

  2. #2
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: 2 Dimensional Array as Dictionary Item

    No problem with:

    Please Login or Register  to view this content.
    Last edited by snb; 05-05-2011 at 09:49 AM.



  3. #3
    Forum Contributor
    Join Date
    02-20-2007
    MS-Off Ver
    2003 & 2007
    Posts
    299

    Re: 2 Dimentional Array as Dictionary Item

    I was also able to get that to work, but what if it was a 2 dim array like:

    Please Login or Register  to view this content.
    How do I access the items now??

  4. #4
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: 2 Dimensional Array as Dictionary Item

    Range values will be stored in a 2-dimensional array.
    2 ranges: A1:C5 and A4:C12

    Please Login or Register  to view this content.
    Last edited by snb; 05-05-2011 at 09:51 AM.

  5. #5
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: 2 Dimentional Array as Dictionary Item

    Perhaps:-
    NB:- This will repeat for each Key in the Dictionary.
    Nb:- I'ves added a 3rd column in Array "cararray"
    Please Login or Register  to view this content.
    Regards Mick

  6. #6
    Forum Contributor
    Join Date
    02-20-2007
    MS-Off Ver
    2003 & 2007
    Posts
    299

    Re: 2 Dimentional Array as Dictionary Item

    That works great, but how can I also identify the key associated with each item while it is looping?

  7. #7
    Forum Contributor
    Join Date
    02-20-2007
    MS-Off Ver
    2003 & 2007
    Posts
    299

    Re: 2 Dimentional Array as Dictionary Item

    Wait...This is exactly what I needed...thank you!!!

    Please Login or Register  to view this content.

  8. #8
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1