Private Sub CommandButton1_Click()
Dim debut As Long, i As Integer
If TextBox1.Value = "" Then
MsgBox ("Veuillez saisir un n° de semaine")
Exit Sub
End If
With Sheets(ComboBox1.Value)
.Activate
debut = .Range("A65536").End(xlUp).Row
.Cells(debut + 1, "A").Value = OFS.TextBox1.Value
.Cells(debut + 1, "B").Value = ComboBox2.Value
.Cells(debut + 1, "C").Value = OFS.TextBox2.Value
.Cells(debut + 1, "D").Value = OFS.TextBox12.Value
.Cells(debut + 1, "E").Value = OFS.TextBox3.Value
.Cells(debut + 1, "F").Value = OFS.TextBox13.Value
.Cells(debut + 1, "G").Value = OFS.TextBox4.Value
.Cells(debut + 1, "H").Value = OFS.TextBox14.Value
.Cells(debut + 1, "I").Value = OFS.TextBox5.Value
.Cells(debut + 1, "J").Value = OFS.TextBox15.Value
.Cells(debut + 1, "K").Value = OFS.TextBox6.Value
.Cells(debut + 1, "L").Value = OFS.TextBox16.Value
.Cells(debut + 1, "M").Value = OFS.TextBox7.Value
.Cells(debut + 1, "N").Value = OFS.TextBox17.Value
.Cells(debut + 1, "O").Value = OFS.TextBox8.Value
.Cells(debut + 1, "P").Value = OFS.TextBox18.Value
.Cells(debut + 1, "Q").Value = OFS.TextBox9.Value
.Cells(debut + 1, "R").Value = OFS.TextBox19.Value
.Cells(debut + 1, "S").Value = OFS.TextBox10.Value
.Cells(debut + 1, "T").Value = OFS.TextBox20.Value
.Cells(debut + 1, "U").Value = OFS.TextBox11.Value
.Cells(debut + 1, "V").Value = OFS.TextBox21.Value
Application.ScreenUpdating = False
.Range("A3:V65535").Sort Key1:=.Range("A3"), Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
.Range("A" & debut).Select
Application.ScreenUpdating = True
Me.Hide
MsgBox ("Saisie réalisée avec succès")
End With
For i = 1 To 21
Me.Controls("TextBox" & i) = ""
Next
ComboBox1.ListIndex = -1
ComboBox2.ListIndex = -1
Sheets("Menu").Select
Me.Show
End Sub