si vous ajoutez cette macro à l'userform "Paiement", c'est mieux ?
Private Sub TextBox9_Exit(ByVal Cancel As MSForms.ReturnBoolean)
With Sheets("2024")
If ActiveSheet.Name <> .Name Then MsgBox "mauvaise feuille": Exit Sub
If ActiveCell.Offset(, 1 - ActiveCell.Column).Value = "" Then
If Range("TBL_Factures").ListObject.ListRows.Count = 0 Then Exit Sub 'tableau est encore vide
If Not IsNumeric(Application.Match(TextBox9.Value, Range("TBL_Factures[numero]"), 0)) Then Exit Sub 'numéro n'existe pas encore
s0 = TextBox9.Value
For i = 1 To 999
s = s0 & " (" & i & ")" 'ajouter un suffix au numero
TextBox9.Value = s
r = Application.Match(s, Range("TBL_Factures[numero]"), 0)
If Not IsNumeric(r) Then Exit For
Next
MsgBox "numéro n'était pas unique"
End If
End With
End Sub