Private Sub BTN_Enreg_Click()
If MsgBox("Voulez-vous sauvegarder les modifications ?", vbQuestion + vbYesNo + vbDefaultButton1, "Confirmation modifications") = vbNo Then Exit Sub: Unload Me
With Sheets("Compte Courant").ListObjects(1)
.DataBodyRange(NumLigne, 1) = CDate(Me.TB_Date)
.DataBodyRange(NumLigne, 2) = Me.CB_ModPaie
.DataBodyRange(NumLigne, 4) = Me.TB_Cheque
.DataBodyRange(NumLigne, 5) = Me.CB_Tiers
.DataBodyRange(NumLigne, 6) = Me.CB_Rubrique
.DataBodyRange(NumLigne, 7) = Me.CB_Classe
.DataBodyRange(NumLigne, 8) = Me.TB_Comment
If Me.TB_Debit.Value = "" Or Not IsNumeric(TB_Debit.Value) Then
.DataBodyRange(NumLigne, 9) = ""
Else
.DataBodyRange(NumLigne, 9) = CDbl(TB_Debit)
End If
If Me.TB_Credit.Value = "" Or Not IsNumeric(TB_Credit.Value) Then
.DataBodyRange(NumLigne, 10) = ""
Else
.DataBodyRange(NumLigne, 10) = CDbl(TB_Credit)
End If
End With
End Sub