Private Sub CommandButton1_Click()
Dim dl As Integer
With Sheets("BDMasques")
.Unprotect Password:="123"
If Me.Cbx_Nom <> "" And Me.Cbx_Types <> "" And Me.Txt_date <> "" And Me.Txt_quantité <> "" Then
Sheets("BDMasques").ListObjects(1).ListRows.Add
dl = Sheets("BDMasques").Range("b9999").End(xlUp).Row
Sheets("BDMasques").Range("B" & dl) = Me.Cbx_Nom
Sheets("BDMasques").Range("C" & dl) = Me.Cbx_Types
Sheets("BDMasques").Range("D" & dl) = CInt(Me.Txt_quantité)
Sheets("BDMasques").Range("E" & dl) = Me.Txt_date
ThisWorkbook.Save
Unload Ajouts_Masques
End If
.Protect Password:="123", DrawingObjects:=False, Contents:=True, Scenarios:=True, AllowFiltering:=True
End With
End Sub