N
neptune6644
I need to loop through a two-dimesnional array (x,y) until a value in x
is empty or the end of the array is reached, whichever comes first.
Example array:
Dim myArray(4,1)
myArray(0,0) = "part 1"
myArray(0,1) = quantity
myArray(1,0) = "part 2"
myArray(1,1) = quantity
myArray(2,0) = "part 3"
myArray(2,1) = quantity
myArray(3,0) = ""
myArray(3,1) = quantity
myArray(4,0) = "part 5"
myArray(4,1) = quantity
In the example above, the loop should stop once it determines
myArray(3,0) is empty. If myArray(3,0) was not empty, the loop would
continue until the end of the array was reached.
Anybody have a code example to do this?
Thanks,
Liam
is empty or the end of the array is reached, whichever comes first.
Example array:
Dim myArray(4,1)
myArray(0,0) = "part 1"
myArray(0,1) = quantity
myArray(1,0) = "part 2"
myArray(1,1) = quantity
myArray(2,0) = "part 3"
myArray(2,1) = quantity
myArray(3,0) = ""
myArray(3,1) = quantity
myArray(4,0) = "part 5"
myArray(4,1) = quantity
In the example above, the loop should stop once it determines
myArray(3,0) is empty. If myArray(3,0) was not empty, the loop would
continue until the end of the array was reached.
Anybody have a code example to do this?
Thanks,
Liam