Bonjour,
SI il y a un texte dans la case B2 (et ceux jusqu'a une case vide), Alors si on clique droit sur la colonne A on affiche une croix.
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
Dim s As Range
On Error Resume Next
If Range("B2").Value <> "" Then
If Not Application.Intersect(ActiveCell, Range("PlageCroix")) Is Nothing Then
If IsEmpty(ActiveCell.Value) Then
ActiveCell.Value = "X"
ElseIf ActiveCell.Value = "X" Or ActiveCell.Value = "x" Then
ActiveCell.Value = ""
End If
End If
End If
Cancel = True
Dim z As Range
End Sub
Si tu veut pouvoir faire cela avec en plus le double clique:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Call Worksheet_BeforeRightClick(Target, Cancel)
End Sub
En espérant que sa t'aide.