Dim t# 'mémorise la variable
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Cancel = True
RAZ
Unprotect "chajmi"
Target.Locked = False
Target.AddComment "Vous avez 30 secondes pour modifier la cellule"
Target.Comment.Shape.TextFrame.AutoSize = True
Protect "chajmi", AllowFormattingCells:=True
t = Now + 30 / 86400
Application.OnTime t, Me.CodeName & ".RAZ"
End Sub
Sub RAZ()
Unprotect "chajmi"
Cells.ClearComments
Cells.Locked = True
Protect "chajmi"
On Error Resume Next
Application.OnTime t, Me.CodeName & ".RAZ", , False
End Sub