Sub Onglets()
Dim n As Integer, i As Integer, Drl As Integer
n = UserForm1.TabStrip1.SelectedItem.Index 'Valeur de l'onglet du TabStrip1
With Sheets("Engagements")
Drl = .Range("A65500").End(xlUp).Row
Select Case n
Case 0 'Tous les coureurs
UserForm1.ListBox1.Clear 'Efface la listBox1
Lecture_liste 'Execute la lecture de toute la page engagements
Case 1 'Poussins
UserForm1.ListBox1.Clear 'Efface la listBox1
For i = 2 To Drl
If .Cells(i, 5) = "Poussin" Then
UserForm1.ListBox1.AddItem .Cells(i, 1).Value
UserForm1.ListBox1.List(UserForm1.ListBox1.ListCount - 1, 1) = .Cells(i, 2).Value
UserForm1.ListBox1.List(UserForm1.ListBox1.ListCount - 1, 2) = .Cells(i, 3).Value
UserForm1.ListBox1.List(UserForm1.ListBox1.ListCount - 1, 3) = .Cells(i, 4).Value
UserForm1.ListBox1.List(UserForm1.ListBox1.ListCount - 1, 4) = .Cells(i, 5).Value
UserForm1.ListBox1.List(UserForm1.ListBox1.ListCount - 1, 5) = .Cells(i, 6).Value
End If
Next i
Case 2
UserForm1.ListBox1.Clear
Case 3
UserForm1.ListBox1.Clear
Case 4
UserForm1.ListBox1.Clear
Case 5
UserForm1.ListBox1.Clear
End Select
End With
End Sub