Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rep As Integer, i
i = ActiveCell.Row
Application.EnableEvents = False
If Range("C" & i) = "Closed" Then
Rep = MsgBox("Are you sure?", vbYesNo + vbQuestion, "Test")
If Rep = vbYes Then
Range("D" & i & ":F" & i & "") = ""
End If
End If
Application.EnableEvents = True
End Sub
Private Sub Change(ByVal Target As Range)
Set Target = Intersect(Target, [A:B], UsedRange)
If Target Is Nothing Then Exit Sub
For Each Target In Intersect(Target.EntireRow, [C:C]) 'si entrées multiples (copier-coller)
If UCase(Target) = "Closed" Then
Application.EnableEvents = False 'désactive les évènements
Application.Undo 'annule l'entrée
Application.EnableEvents = True 'réactive les évènements
Target.Select
Exit For
End If
Next
End Sub