Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have this if statement:
ElseIf vemail.Item(j).Text <> vemail.Item(j-1).Text Then
But it keeps stopping at this part. Is there something wrong with the syntax?
Is your loop running at least one time - you could check such things with a msgbox on one of the loop-counter, maybe with:
msgbox j 'or other counters
It could be that your counter runs out of the number of array-member.
Further is your syntax of querying vemail.Item(j).Text correct, also here is a msgbox helpful:
var = vemail.Item(j).Text
msgbox var
- Marcus
Is your loop running at least one time - you could check such things with a msgbox on one of the loop-counter, maybe with:
msgbox j 'or other counters
It could be that your counter runs out of the number of array-member.
Further is your syntax of querying vemail.Item(j).Text correct, also here is a msgbox helpful:
var = vemail.Item(j).Text
msgbox var
- Marcus
I tried all those, it's definitely something to do with the comparison of the array, e.g. it errors when using this: vemail.Item(1).Text <> vemail.Item(0).Text
Even though vemail does have values in Item(1) and Item(0). Everything else in the loop works.
Oh but this works:
var = vemail.Item(j).Text
msgbox var
So it's strange that a comparison wouldn't work.
I think I figured it out. It seems the if statement runs out of array members.