Option Explicit
Private HOnTime As Date
Sub AfficherHeure()
Feuil1.Range("A3").Value = Format(Now, "hh:mm:ss")
HOnTime = Now + 1 / 86400
Application.OnTime HOnTime, "AfficherHeure"
End Sub
Sub ArrêtAffichHeure()
If HOnTime = 0 Then Exit Sub
Application.OnTime HOnTime, "AfficherHeure", Schedule:=False
HOnTime = 0
End Sub
Function TimerActive() As Boolean
TimerActive = HOnTime <> 0
End Function