```
Dim intX, intY As Integer
    intY = Nums.GetUpperBound(0)
    For intX = 0 To intY
        With Nums(intX)
            If .strFtID = strID Then

        ‘calls various subs/functions to get results to show in listbox

                listbox.Items.Add(String.Format(strFmt, "various titles”))
                listbox.Items.Add(String.Format(strFmt, variable results))
            End If
        End With
    Next

```

In this loop the listbox for titles is added for every match but I only want it to be added once. I also want to add “no match” if after the entire loop has searched and comes up with no match. There are multiple matches in this loop so it can’t be placed within it or under “else”.