How to pull two items from Array

So, I’ve got the basics for an Array down, and how to pull items from it one by one until it’s empty.

Dim aTest() as string Dim i as Integer aTest=Array("Dog", "Cat", "Bird", "Snake") aTest.Shuffle For i = 0 to Ubound(aTest) msgbox Str(aTest(i)) Next

My question is, how do I pull two items at a time from an Array?

There’s no such build in Method.

That depends on what you want to do with them.

If you are putting them together, then you can do something like atest(i) + atest(i+1) watching out for out of bounds errors. If you are keeping them separate, then you’ll have to pull them separately.

If they are always meant to be in pairs, you might be better off using a dictionary or other such data-holding type.

Or even an array of Pair, if that’s what Niles meant.