Private Sub Worksheet_Change(ByVal Target As Range)
Protect "toto", UserInterfaceOnly:=True 'mot de passe à adapter
Set Target = Intersect(Target, [F:G])
If Target Is Nothing Then Exit Sub
Dim P As Range, Q As Range, flag As Boolean
For Each Target In Target 'si entrées/effacements multiples (copier-coller)
Set P = Intersect(Target.EntireRow, [F:G])
If Application.CountA(P) = 2 Then
If Not flag Then
If MsgBox("Confirmez-vous ce que vous venez d'entrer ?", 4) = vbNo Then
Application.EnableEvents = False
Application.Undo 'annule l'entrée
Application.EnableEvents = True
Exit Sub
End If
End If
Set Q = Union(IIf(Q Is Nothing, P, Q), P)
flag = True
End If
Next Target
If Not Q Is Nothing Then Q.Locked = True 'verrouillage
End Sub