Sub AlimenteListbox()
Dim J As Long, i As Integer, Indice As Integer, D As Integer, T2()
Me.ListBox1.Clear
Indice = 1 ' Par défaut toujours 1 enregistrement
For J = 1 To UBound(T1)
If T1(J, 5) Like Me.CbbPerso & "*" And T1(J, 8) Like Me.CbbType & "*" And T1(J, 4) Like Me.TbRechFiche & "*" And T1(J, 1) Like Me.Textdate & "*" Then
Indice = Indice + 1
ReDim Preserve T2(1 To 26, 1 To Indice)
For i = 1 To UBound(T1, 2)
T2(i, Indice) = T1(J, i)
Next i
For D = 1 To UBound(T1, 1)
Next D
End If
Next J
If Indice > 1 Then
Me.ListBox1.List = Application.Transpose(T2)
Me.ListBox1.RemoveItem 0 ' On supprime l'enregistrement par défaut
End If
End Sub
Sub AlimenteListbox()
Dim J As Long, i As Integer, Indice As Integer, D As Integer, T2()
Me.ListBox1.Clear
Indice = 1 ' Par défaut toujours 1 enregistrement
For J = 1 To UBound(T1)
If T1(J, 5) Like Me.CbbPerso & "*" And T1(J, 8) Like Me.CbbType & "*" And T1(J, 4) Like Me.TbRechFiche & "*" And T1(J, 1) Like Me.Textdate & "*" Then
Indice = Indice + 1
ReDim Preserve T2(1 To 26, 1 To Indice)
For i = 1 To UBound(T1, 2)
T2(i, Indice) = T1(J, i)
Next i
For D = 1 To UBound(T1, 1)
Next D
End If
Next J
If Indice > 1 Then
Me.ListBox1.List = Application.Transpose(T2)
Me.ListBox1.RemoveItem 0 ' On supprime l'enregistrement par défaut
End If
End Sub