Re : Recherche intuitive
Bonjour à tous
Je fait remonter ce post, pour vous demander si vous pourriez m'expliqer en me detaillant cette partie du code.
Notemment les parties ou apparaissent [clients] ou ("client") (à quoi font refférence ces termes )
Private Sub UserForm_Initialize()
NbCol = [clients].CurrentRegion.Columns.Count
Me.ListBox1.ColumnCount = NbCol
For i = 1 To NbCol
temp = temp & "50;"
Next i
Me.ListBox1.ColumnWidths = temp
Me.ListBox1.List = Range("clients").Resize(, NbCol).Value
End Sub
Private Sub TextBox1_Change()
Me.ListBox1.Clear
i = 0
Set plage = [clients].Resize(, NbCol)
Set c = plage.Find(Me.TextBox1, , , xlPart)
If Not c Is Nothing Then
premier = c.Address
Do
Me.ListBox1.AddItem
Lig = c.Row - plage.Row + 1
For col = 1 To NbCol
Me.ListBox1.List(i, col - 1) = plage.Cells(Lig, col)
Next col
i = i + 1
Set c = plage.FindNext(c)
Loop While Not c Is Nothing And c.Address <> premier
End If
End Sub
Cdlt J-C