Hello everyone:
I have a 'For Each' loop that contains some items I don't want to analyse. Now I use a GoTo command to 'skip' an item. But this is not very elegant and (knowing .NET) there is probably a way to skip to the next item without using GoTo.
I'll show you a simplified version of my loop, designed to add all animals to a list, except the Leopard:
(Indeed, simplified, because there's like two pages of code in the real loop.)
VB Code:
For Each Animal As String In Animals If Animal = "Leopard" Then GoTo OhNoALeopard ListBox.Items.Add(Animal) OhNoALeopard: Next
Thanks for any help.




:
)
Reply With Quote