Private Sub CommandButton1_Click()
Dim y As Long
Dim b As Boolean
With Worksheets("BDD")
.Activate
For y = 2 To .Range("A1").CurrentRegion.Rows.Count
b = Me.ComboBox1.Value = .Cells(y, "C").Value And Me.TextBox1.Value = CStr(.Cells(y, "L").Value)
If b Then
If CheckBox1.Value = True Then .Cells(y, 18).Value = "OUI"
.Range(.Cells(y, 1), .Cells(y, 18)).Select
MsgBox ("Enregistrement effectué")
Exit For
End If
Next y
If b Then
Unload Me
Else
MsgBox ("Données non trouvées!!! ")
End If
End With
End Sub