Private Sub CBAfficher_Click()
Dim dat1 As Date, dat2 As Date, t, i&, n&, liste(), j%
ListBox1.Clear
If Not IsDate(Text1) Then TextBox1 = "": Text1.SetFocus: Exit Sub
If Not IsDate(Text2) Then TextBox2 = "": Text2.SetFocus: Exit Sub
dat1 = CDate(Text1): dat2 = CDate(Text2)
t = Sheets("Resultat").[A1].CurrentRegion.Resize(, 19) 'tableau VBA, plus rapide
For i = 2 To UBound(t)
If t(i, 18) >= dat1 And t(i, 19) <= dat2 Then
n = n + 1
ReDim Preserve liste(1 To 19, 1 To n) 'tableau VBA, plus rapide
For j = 1 To 19
liste(j, n) = t(i, j)
Next j
End If
Next i
If n = 1 Then ReDim Preserve liste(1 To 19, 1 To 2) 'pour l'ajout d'une ligne vide
ListBox1.List = Application.Transpose(liste) 'Transpose accepte 65536 lignes au maximum
End Sub