Here's my code:
VB Code:
Dim SearchString As String Dim oItem As ListItem Dim oSubItem As ListSubItem SearchString = InputBox("", "Search", "Enter Customer Name", 5800, 5240) For Each oItem In ListView1.ListItems If InStr(1, oItem.Text, SearchString, vbTextCompare) Then oItem.Selected = True oItem.EnsureVisible ListView1.SetFocus Exit For Else For Each oSubItem In oItem.ListSubItems If InStr(1, oSubItem.Text, SearchString, vbTextCompare) Then oItem.Selected = True oItem.EnsureVisible ListView1.SetFocus Exit For End If Next If Not oSubItem Is Nothing Then Exit For End If Next
I need to loop a peice of code until it can no longer find the "SearchString".
How would I go about doing that?




Reply With Quote