Private Sub CommandButton1_Click()
Dim ws
On Error Resume Next
ListBox1.Clear
If TextBox1 = "" Then Exit Sub
For Each ws In Worksheets
With ws
Set C = .UsedRange.Find(TextBox1, LookIn:=xlValues)
If Not C Is Nothing Then
firstAddress = C.Address
Do
dcol = .Cells(C.Row, 256).End(xlToLeft).Column
With ListBox1
If dcol > .ColumnCount Then .ColumnCount = dcol
.ColumnWidths = "100" & "20" & "20" & "120" & "120"
.AddItem ws.Cells(C.Row, 1)
X = ListBox1.ListCount - 1
For i = 2 To dcol
ListBox1.List(X, i - 1) = ws.Cells(C.Row, i)
Next
End With
Set C = .UsedRange.FindNext(C)
Loop While Not C Is Nothing And C.Address <> firstAddress
End If
End With
Next
End Sub