Private Sub Afficher()
Dim I As Single, k As Integer, Calc As Currency
Dim MyArray(20, 5)
ListBox1.ColumnCount = 5 'NB de colonne
ligne = 0
DerLigne = Range("A65535").End(xlUp).Row
For I = 2 To DerLigne
If Cells(I, 1) = ComboBox1 Then
MyArray(ligne, 0) = Cells(I, 1)
MyArray(ligne, 1) = Cells(I, 3)
MyArray(ligne, 2) = Cells(I, 6)
MyArray(ligne, 3) = Cells(I, 8)
MyArray(ligne, 4) = Cells(I, 9)
ligne = ligne + 1
End If
Next I
ListBox1.List() = MyArray
With ListBox1
For k = 0 To .ListCount - 1
Calc = Calc + .List(k, 4)
Next
End With
TextBox1.Text = Format(Calc, "### ### ##0.00")
MsgBox ligne & " enregistrement(s) trouvé(s)"
End Sub