Private Sub CommandButton1_Click() 'Enregistrer
Dim Ls As Long, a()
Ls = Cells(Rows.Count, 2).End(xlUp).Row
If Ls < 7 Then Exit Sub
ReDim a(1 To 7)
a(1) = Cells(Ls, 1).FormulaR1C1
If IsDate(TextBox1) Then a(2) = CDate(TextBox1)
a(3) = "=R[-1]C[4]"
a(4) = Val(Replace(TextBox2, ",", "."))
a(5) = Val(Replace(TextBox3, ",", "."))
a(6) = Val(Replace(TextBox4, ",", "."))
a(7) = Cells(Ls, 7).FormulaR1C1
Cells(Ls, 1).Resize(, 7).Copy Cells(Ls + 1, 1) 'pour copier les formats
Cells(Ls + 1, 1).Resize(, 7) = a 'restitue le tableau
TextBox1 = ""
TextBox2 = ""
TextBox3 = ""
TextBox4 = ""
End Sub
Private Sub CommandButton2_Click() 'Supprimer
Dim Ls As Long
Ls = Cells(Rows.Count, 2).End(xlUp).Row
If Ls > 7 Then Cells(Ls, 1).Resize(, 7).Delete xlUp
End Sub