Results 1 to 2 of 2

Thread: Looping my Multidimensional dynamic Array

  1. #1

    Thread Starter
    Fanatic Member carlblanchard's Avatar
    Join Date
    Sep 2003
    Location
    Bournemouth (UK)
    Posts
    539

    Looping my Multidimensional dynamic Array

    Now ive got my array sorted i wana be able to loop it per row kinda thing, A: is this possible, B: how ?

    My current code is this

    VB Code:
    1. For Each Item In CusArray
    2.                     MsgBox(Item,1)
    3. Next
    it returns all the subscripts of the array and i get index out of range message all i want to be able to do is count how many indexes there are in the array and loop the indexes accordly
    I am curretly building a defect management system for software and web developers,
    If you wana try it out (beta test) and keep it for free just send me a message

  2. #2
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227
    for example >>
    Code:
      Dim myArray(2, 2)
            Dim counter1, counter2 As Integer
            For counter1 = 0 To myArray.GetUpperBound(0)
                For counter2 = 0 To myArray.GetUpperBound(1)
                    MsgBox(myArray(counter1, counter2))
                Next
            Next

Posting Permissions

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



Click Here to Expand Forum to Full Width