Option Explicit
Private DblClic As Boolean
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Application.Intersect(Target, Range("l1:l10000")) Is Nothing Then
DblClic = True
MsgBox "1 seul clic ici"
ActiveCell = ""
Cells(ActiveCell.Row, 1).Select
Exit Sub
End If
Cancel = True
End Sub
Private Sub Worksheet_SelectionChange(ByVal R As Range)
If Not Intersect(R, Range("l7:l10000")) Is Nothing And R.Count = 1 Then
Dim TDéb As Single
DblClic = False
TDéb = VBA.Timer
Do: DoEvents: Loop Until VBA.Timer - TDéb > 0.15
If DblClic Then Exit Sub
ActiveCell = "OK 1 clic c'est bon"
'MsgBox "OK 1 clic c'est bon"
End If
End Sub
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
If Not Application.Intersect(Target, Range("l1:l10000")) Is Nothing Then
Cancel = True
ClicDroit = True
'MsgBox "BeforeRightClick " & Target.Address
MsgBox "1 seul clic ici"
ActiveCell = ""
Cells(ActiveCell.Row, 1).Select
End If
End Sub