Dim flag As Boolean 'mémorise la variable
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.OnTime Now + 2 / 86400, Me.CodeName & ".MaMacro" 'temporisation 2 secondes
End Sub
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
flag = True
Cancel = True
Target.Interior.Color = vbYellow 'code à adapter
End Sub
Sub MaMacro()
If flag Then flag = False: Exit Sub
MsgBox "Bonsoir Magic_Doctor, Lionel"
End Sub