With Sheets(Feuil1.Name)
Numlig = .Columns(2).Find("").Row 'on trouve la dernière ligne vide du tableau'
.Cells(Numlig, 1) = DateValue(TextBox1.Value) 'Date'
.Cells(Numlig, 2) = ComboBox1.Value 'Catégorie'
.Cells(Numlig, 3) = TextBox3.Value 'Libellé'
If OptionButton2 = True Then
.Cells(Numlig, 4) = Val(TextBox4.Value) 'Montant crédit'
Else
.Cells(Numlig, 5) = -Val(TextBox4.Value) 'Montant débit'
End If
'=G8+E9+F9
.Range("F" & Numlig).FormulaLocal = "=F" & Numlig - 1 & "+D" & Numlig & "+E" & Numlig
End With