Hmm... you are not correctly using Find and FindNext method to find all matches in the database sheet.
Embedding SamT's code in your original code, you'll get the code like below. Try it.
Private Sub part2_Click() Dim rngToSearch As Range Dim rngToFind As Range Dim valToFind As Variant Dim FirstFoundAddress As String ListBox2.Clear valToFind = partsearch2.Value 'ComboBox name With Worksheets("database") Set rngToSearch = .Columns("A") End With Set rngToFind = rngToSearch.Find(What:=valToFind, _ LookIn:=xlFormulas, _ LookAt:=xlWhole, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False) If Not rngToFind Is Nothing Then FirstFoundAddress = rngToFind.Address Do DoEvents ListBox2.AddItem With ListBox2 .List(.ListCount - 1, 0) = rngToFind.Value 'part number .List(.ListCount - 1, 1) = rngToFind.Offset(0, 1).Value 'desc .List(.ListCount - 1, 2) = rngToFind.Offset(0, 2).Value 'stor loc .List(.ListCount - 1, 3) = rngToFind.Offset(0, 3).Value 'bin loc .List(.ListCount - 1, 4) = rngToFind.Offset(0, 4).Value 'qty .List(.ListCount - 1, 5) = rngToFind.Offset(0, 5).Value 'mfg .List(.ListCount - 1, 6) = rngToFind.Offset(0, 6).Value 'pm name End With Set rngToFind = rngToSearch.FindNext(rngToFind) Loop While Not rngToFind Is Nothing And rngToFind.Address <> FirstFoundAddress Else MsgBox valToFind & " Not found in Database." End If End Sub




Reply With Quote
