1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
   |  
Public WithEvents monevenement As Application
 
Private Sub monevenement_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
Instruction
End Sub
 
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Dim PauseTime, Start
Set monevenement= Application
    PauseTime = 60  ' Définit la durée.
    Start = Timer    ' Définit l'heure de début.
    Do While Timer < Start + PauseTime
        DoEvents    ' Donne le contrôle à d'autres processus.
    Loop
    ThisWorkbook.Save
   ThisWorkbook.Close
   Set monevenement= Nothing
End Sub | 
Partager