Private Sub cmdajouter_Click()
Dim i As Integer
For i = 3 To 26
If Me.Controls("checkbox" & i) = True Then
derligne = Sheets(Me.Controls("checkbox" & i).Caption).Range("A65535").End(xlUp).Row + 1
With Sheets(Me.Controls("checkbox" & i).Caption)
.Cells(derligne, 1) = TextBox1.Value
.Cells(derligne, 2) = TextBox2.Value
.Cells(derligne, 3) = TextBox3.Value
.Cells(derligne, 4) = TextBox4.Value
.Cells(derligne, 5) = TextBox5.Value
.Cells(derligne, 6) = TextBox6.Value
.Cells(derligne, 7) = TextBox7.Value
.Cells(derligne, 8) = TextBox8.Value
.Cells(derligne, 9) = TextBox9.Value
End With
Me.Controls("checkbox" & i) = False
End If
Next i
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
TextBox7.Value = ""
TextBox8.Value = ""
TextBox9.Value = ""
End Sub