+ Reply to Thread
Results 1 to 3 of 3

Help with looping through all elements in Class Array

  1. #1
    Forum Contributor
    Join Date
    11-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    405

    Question Help with looping through all elements in Class Array

    Hi guys,

    I am trying to loop through all the elements of my class array using the following

    Please Login or Register  to view this content.

    Class
    My Class looks like the following:
    Please Login or Register  to view this content.

    I keep receiving an error on the line: for i = UBound(QueryField.AllPlantMakes) To UBound(QueryField.AllPlantMakes)

    Why cant I loop through this 'class' array?

    Regards
    Jordan
    Last edited by jordan2322; 04-15-2013 at 06:47 PM.

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Help with looping through all elements in Class Array

    I'm not really sure how you get to that line in your code since I can't get your code to compile, I also can't help thinking that you'd be better off using a collection or dictionary rather than an array. Maybe like this:
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by Kyle123; 04-10-2013 at 03:46 AM.

  3. #3
    Forum Contributor
    Join Date
    11-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    405

    Re: Help with looping through all elements in Class Array

    Thanks again Kyle123,

    I have decided to use collections instead of arrays - which is proving to make my life a hell of a lot easier!

    Regards Jordan

+ 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