1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| Dim DéBit, CréDit, SolDE As String
DéBit = 0
CréDit = 0
SolDE = 0
Dim NbLgne, U As Variant
Dim i As Integer
Dim K, j, y, P
Dim Teste As Boolean
ListBox1.Clear
NbLgne = Sheets("Récap_cptes").Range("a65000").End(xlUp).Row
Sheets("feuil2").Range("b27") = NbLgne
For i = 2 To NbLgne + 1
Teste = False
For P = 0 To listbox2.ListCount - 1
If listbox2.Selected(P) = True And Cells(i, 9) Like "*" & listbox2.List(P) Then
Teste = True
Exit Sub
End If
Next P
If Cells(i, 5) Like "*" & ComboBox3.Value & "*" And _
Teste = True And Cells(i, 10) <> "" Then
Me.ListBox1.AddItem
Me.ListBox1.List(K, 0) = Sheets("Récap_cptes").Cells(i, 2)
Me.ListBox1.List(K, 1) = "| " & Sheets("Récap_cptes").Cells(i, 3)
Me.ListBox1.List(K, 2) = "| " & Sheets("Récap_cptes").Cells(i, 5)
Me.ListBox1.List(K, 3) = "| " & Sheets("Récap_cptes").Cells(i, 6)
Me.ListBox1.List(K, 4) = "| " & Sheets("Récap_cptes").Cells(i, 7)
Me.ListBox1.List(K, 5) = "| " & Sheets("Récap_cptes").Cells(i, 9)
Me.ListBox1.List(K, 6) = "| " & Sheets("Récap_cptes").Cells(i, 8)
Me.ListBox1.List(K, 7) = "| " & Sheets("Récap_cptes").Cells(i, 30)
DéBit = DéBit + Sheets("Récap_cptes").Cells(i, 30)
Me.ListBox1.List(K, 8) = "| " & Sheets("Récap_cptes").Cells(i, 29)
CréDit = CréDit + Sheets("Récap_cptes").Cells(i, 29)
Me.ListBox1.List(K, 9) = "| " & Sheets("Récap_cptes").Cells(i, 4)
K = K + 1
End If
Next i |
Partager