Hello.
Private Sub TextBox1_Change()
'requires reference to Microsoft ActiveX Data Objects xxx Library
'https://www.connectionstrings.com/excel/
Const cs As String = "Provider=Microsoft.ACE.OLEDB.12.0;" & _
"Extended Properties='Excel 12.0 Xml;HDR=NO;';"
Dim cn As New ADODB.Connection, rs As New ADODB.Recordset, ws As Worksheet
Set ws = ThisWorkbook.Sheets("database")
ListBox1.Clear
With cn
.Open cs & "Data Source=" & ws.Parent.FullName
With rs
.Open "SELECT [f4] FROM `database$` where [f4] <> 'name' and " & _
"[f4] like '%" & TextBox1 & "%'", cn, adOpenStatic, adLockReadOnly
Do Until .EOF
ListBox1.AddItem .Fields(0)
.MoveNext
Loop
TextBox2 = rs.RecordCount
.Close
End With
.Close
End With
End Sub