Private Sub Resultats_Eleves()
Dim d1 As Object, d2 As Object, class As String, WsB As Worksheet, Ws As Worksheet
Dim Tablo As Variant, Tbl1, Tbl2
Set d1 = CreateObject("Scripting.Dictionary"): Set d2 = CreateObject("Scripting.Dictionary")
class = TextBox3.Value
With WsB
Tablo = .Range("a2:u" & .Range("u" & Rows.Count).End(xlUp).Row)
End With
On Error Resume Next
For i = LBound(a) To UBound(a)
If Tablo(i, 13) = "Réussi" And Tablo(i, 7) = class Then
d1(i) = Array(Tablo(i, 2), a(i, 7), Tablo(i, 8), Tablo(i, 9), Tablo(i, 10), Tablo(i, 11), Tablo(i, 12), Tablo(i, 13))
End If
If a(i, 13) = "Echoué" And a(i, 7) = class Then
d2(i) = Array(Tablo(i, 2), a(i, 7), Tablo(i, 8), Tablo(i, 9), Tablo(i, 10), Tablo(i, 11), Tablo(i, 12), Tablo(i, 13))
End If
Next i
For Each Ws In ThisWorkbook.Sheets
If Ws.Name = class Then Ws.Activate
Next Ws
Tbl1 = Application.Transpose(Application.Transpose(d1.items))
Tbl2 = Application.Transpose(Application.Transpose(d2.items))
ActiveSheet.Range("a2").Resize(UBound(Tbl1), UBound(Tbl1, 2)) = Tbl1
Sheets("6ème").Range("a2").Resize(UBound(Tbl2), UBound(Tbl2, 2)) = Tbl2
Set d1 = Nothing
Set d2 = Nothing
End Sub