Private Sub RechercheC1_Change()
If RechercheC1.Text <> "" Then
Call Recherche1
Else
Exit Sub
End If
End Sub
Private Sub Recherche1()
With Application
.ScreenUpdating = False
.Calculation = xlCalculationManual
End With
ListBoxLocataire.Clear
With ws
derlig = .Range("a" & Rows.Count).End(xlUp).Row
Set plage = .Range("a2:a" & derlig)
For Each cel In plage
If cel.Offset(, 0) Like RechercheC1 & "*" Then
ListBoxLocataire.AddItem cel.Offset(0, 0)
For k = 1 To 15
ListBoxLocataire.List(ListBoxLocataire.ListCount - 1, k - 1) = cel.Offset(0, k - 1)
Next k
End If
Next cel
label22 = ListBoxLocataire.ListCount
End With
With Application
.ScreenUpdating = True
.Calculation = xlCalculationAutomatic
End With
End Sub