1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| Private Sub Valider_Click()
If UserForm1.DateA = "" Or UserForm1.Marque = "" Or UserForm1.Options = "" Or UserForm1.SousOptions = "" Then
MsgBox "Veuillez saisir tout les champs"
Else
i = 2
With Sheets("Base de donnée")
' i = première ligne libre
i = .Range("a" & .Rows.Count).End(xlUp).Row + 1
.Cells(i, 1).Value = UserForm1.DateA
.Cells(i, 2).Value = UserForm1.Marque
.Cells(i, 3).Value = UserForm1.Options
.Cells(i, 4).Value = UserForm1.SousOptions
End With
Unload UserForm1
End If
End Sub |
Partager