Private Sub CommandButton2_Click()
Unload SaisieNouveauNom
End Sub
Private Sub CommandButton1_Click()
With Sheets("GestionEquipe")
If ComboBox1.ListIndex = -1 Then Exit Sub
y = ComboBox1.ListIndex + 2
x = Cells(8, y).End(xlDown).Row + 1
.Cells(x, y) = TextBox1.Value & " " & TextBox2.Value
Range("B9:B24").Select
ActiveWorkbook.Worksheets("GestionEquipe").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("GestionEquipe").Sort.SortFields.Add Key:=Range( _
"B10:B24"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("GestionEquipe").Sort
.SetRange Range("B9:B24")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("C9:C24").Select
ActiveWorkbook.Worksheets("GestionEquipe").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("GestionEquipe").Sort.SortFields.Add Key:=Range( _
"C10:C24"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("GestionEquipe").Sort
.SetRange Range("C9:C24")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("D9:D24").Select
ActiveWorkbook.Worksheets("GestionEquipe").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("GestionEquipe").Sort.SortFields.Add Key:=Range( _
"D10:D24"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("GestionEquipe").Sort
.SetRange Range("D9:D24")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("E9:E24").Select
ActiveWorkbook.Worksheets("GestionEquipe").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("GestionEquipe").Sort.SortFields.Add Key:=Range( _
"E10:E24"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("GestionEquipe").Sort
.SetRange Range("E9:E24")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("F9:F24").Select
ActiveWorkbook.Worksheets("GestionEquipe").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("GestionEquipe").Sort.SortFields.Add Key:=Range( _
"F10:F24"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("GestionEquipe").Sort
.SetRange Range("F9:F24")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End With
Unload SaisieNouveauNom
SaisieNouveauNom.Show
End Sub