Private Sub Btn_Valider_Click()
If Agent = "" Or saisiedate = "" Or Civilité = "" Or Devis = "" Or Montant = "" Or Text_Date = "" Or Client_RMA = "" Or TextBox_Nom = "" Or TextBox_Prenom = "" Or TextBox_CIN = "" Or TextBox_Ville = "" Or TextBox_Tel = "" Or TextBox_Mail = "" Then MsgBox "Remplir tous les champs": Exit Sub
With Sheets("Base")
bas = .[B100000].End(xlUp).Row + 1 'derniere ligne+1
.Cells(bas, 1) = bas - 4
.Cells(bas, 2) = CDate(Me.Text_Date)
.Cells(bas, 2).NumberFormat = "dd/mmm/yyyy"
.Cells(bas, 3) = Civilité'ajout
.Cells(bas, 4) = Me.TextBox_Nom
.Cells(bas, 5) = Me.TextBox_Prenom
.Cells(bas, 6) = Me.TextBox_CIN
.Cells(bas, 7) = Me.TextBox_Ville
.Cells(bas, 8) = Me.TextBox_Tel
.Cells(bas, 9) = Me.TextBox_Mail
.Cells(bas, 10) = Me.Client_RMA
If Me.Client_RMA = "Oui" Then
.Cells(bas, 11) = Me.Agent
Else
.Cells(bas, 12) = Me.Agent
End If
.Cells(bas, 13) = CDate(Me.saisiedate) 'échéance
.Cells(bas, 13).NumberFormat = "dd/mmm/yyyy"
.Cells(bas, 14) = Me.Devis
.Cells(bas, 15) = Me.Montant
.Cells(bas, 15).NumberFormat = "0.00"
'.Cells(bas, 16) = ""'devis envoyé
.Cells(bas, 17) = Me.TextBox10 'comment
End With
Unload Me
End Sub