I need to loop in a variant variable

Hi,

I have this code and I am trying to loop to find out the value of the variant…

Dim test As Variant

test = Evaluate(|@Unique(@DbColumn(“”:“NoCache”;“”:“”;“(AllItemsLookup)”;1))|)

I tried do while test(0) that did not work… I tried without the (0)…

how can I loop throught the test value

Subject: I need to loop in a variant variable…

Your variant test will end up something like this

test(0) = “Category1”

test(1) = “Category2”

test(2) = “Category3” etc.

To loop through the results use a forall loop. The following will

display a message for the first 5 results and then exit to stop you pressing OK 100 times if 100 results are returned

dim count as integer

count = 0

Forall results in test

msgbox results

if count = 5 then

exit sub

end if

count = count + 1

End Forall