Private Sub CommandButton1_Click()
If Me.TextBox1.value = "" Or Me.TextBox2.value = "" Then
MsgBox "Veuillez entrer le numéro et la date du reçu", vbCritical + vbMsgBoxRight, "Erreur"
Exit Sub
End If
Me.Tag = Sheets("QUITTANCE").Range("a65536").End(xlUp).ROW + 1
ThisWorkbook.Worksheets("QUITTANCE").Range("b" & Me.Tag).value = UserForm1.N_Mag.value
ThisWorkbook.Worksheets("QUITTANCE").Range("c" & Me.Tag).value = Me.TextBox1.value
ThisWorkbook.Worksheets("QUITTANCE").Range("d" & Me.Tag).value = Me.TextBox2.value
Unload Me
End Sub