Bonjour
Vois une solution alternative en utilisant le double click dans la cellule avec ce code
Dim ok As Boolean
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If ok = True Then Exit Sub
If Not Intersect(Target, Range("B2:B4")) Is Nothing Then
Cancel = False
ok = True
If Target = "X" Then Target.ClearContents Else: Target = "X"
ok = False
End If
If Not Intersect(Target, Range("B8:B11")) Is Nothing Then
Cancel = False
ok = True
If Target = "X" Then Target.ClearContents Else: Target = "X"
ok = False
End If
Cancel = True
End Sub
Si ok, clique sur le V vert à coté du bouton EDITER pour cloturer le fil
Amicalement
Edit Dan :
Oups je viens de relire ta demande dans le fichier. essaie ceci
Dim ok As Boolean
Private Sub Worksheet_Change(ByVal Target As Range)
If ok = True Then Exit Sub
If Not Intersect(Target, Range("B2:B4")) Is Nothing Then
ok = True
If Target > "" Then Target = "X" Else: Target.ClearContents
ok = False
End If
If Not Intersect(Target, Range("B8:B11")) Is Nothing Then
ok = True
If Target > "" Then Target = "X" Else: Target.ClearContents
ok = False
End If
End Sub