Private Sub UserForm_Initialize()
Dim i As Byte, k As Byte
Dim temp As String
Sheets("Donnees brutes").Select
For j = 2 To Range("a65536").End(xlUp).Row
ComboBox1 = Range("a" & j)
If ComboBox1.ListIndex = -1 Then ComboBox1.AddItem Range("a" & j)
With ComboBox1
For i = 0 To .ListCount - 1
For k = 0 To .ListCount - 1
If .List(i) < .List(k) Then
temp = .List(i)
.List(i) = .List(k)
.List(k) = temp
End If
Next k
Next i
End With
Next j
End Sub
Private Sub ComboBox1_Change()
Dim i As Byte, k As Byte
Dim temp As String
'Filtrer mon tableau
Sheets("Donnees brutes").Range("A1:AE1").Select
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:=ComboBox1.Value
'Charger mon combobox2
Sheets("Donnees brutes").Select
For j = 2 To Range("c65536").End(xlUp).Row
ComboBox2 = Range("c" & j)
If ComboBox2.ListIndex = -1 Then ComboBox1.AddItem Range("c" & j)
With ComboBox2
For i = 0 To .ListCount - 1
For k = 0 To .ListCount - 1
If .List(i) < .List(k) Then
temp = .List(i)
.List(i) = .List(k)
.List(k) = temp
End If
Next k
Next i
End With
Next j
End Sub