Private Sub CommandButton6_Click() 'Trier
Dim Nb%, Col%
Dim Motif$
Col = 16
Nb = Cells(1, 19).Value
Motif = CommandButton6.Caption
'------- Tri A-Z ----------
If Motif = "Trie A-Z" Then
Range(Cells(2, Col), Cells(Nb + 1, Col + 2)).Select
ActiveCell.Sort key1:=Cells(2, Col), order1:=xlAscending, Header:=xlGuess
CommandButton6.Caption = "Trie Z-A"
CommandButton6.BackColor = RGB(250, 100, 100)
Cells(1, 10).Select
ElseIf Motif = "Trie Z-A" Then
Range(Cells(2, Col), Cells(Nb + 1, Col + 2)).Select
ActiveCell.Sort key1:=Cells(2, Col), order1:=xlDescending, Header:=xlGuess
CommandButton6.Caption = "Trie A-Z"
CommandButton6.BackColor = RGB(100, 250, 100)
Cells(1, 10).Select
End If
'Call ChargementListBox
End Sub