I am trying to create a search where the user types into the text box 'ItemDescription' then hits the 'ItemDescSearch' button (see below code) to pollute the list box 'lbSamDesc' with any partial matches from the specified range. Currently when I click on the button it takes about 8 seconds then no results are displayed in the List Box. What am I doing wrong?
Private Sub ItmDescSearch_Click()
Dim c As Range, f As Range
lbSamDesc.Clear
For Each c In Worksheets("EquipmentData").Range("F6", Worksheets("EquipmentData").Range("F" & Rows.Count).End(xlUp))
Set f = c.Find(ItemDescription.Value, lookat:=xlPart)
If Not f Is Nothing Then
lbSamDesc.AddItem c.Value
End If
Next c
End Sub
Bookmarks