Private Sub CommandButton1_Click()
'double click bouton ajouter
If Not IsDate(Madate.Value) Then
MsgBox "Date non renseignée ou invalide. Veuillez corriger s'il vous plaît.", vbExclamation, "Enregistrement mouvement de stock"
Exit Sub
End If
If Produits.Value = "élingue" Then
MsgBox "Veuillez rajouter àprès élingue à la main le numéro de l'élingue"
Exit Sub
End If
Dim Ligne As Integer
If MsgBox("confirmez-vous l'ajout des données ?", vbYesNo, "confirmation") = vbNo Then Exit Sub
With Sheets("Mouvements de stock").ListObjects("T_Stock").ListRows.Add().Range
.Cells(1, 1) = Véhicule.Value
.Cells(1, 2) = CDate(Madate.Value)
.Cells(1, 3) = Zone.Value
.Cells(1, 4) = Produits.Value
.Cells(1, 5) = Sortie.Value
End With
Unload Interface
Interface.Show
End Sub