Public ProchainChrono, Start
Sub Go()
Start = Timer()
majChrono
MaMacroQuiPrendDuTemps
End Sub
Sub MaMacroQuiPrendDuTemps()
Dim Cellule As Range
'Du code bidon qui dure et pendant lequel le chrono doit continuer à s'afficher toutes les secondes
For Each Cellule In Range("MA_PLAGE")
Cellule.Value = Int((1000 - 1 + 1) * Rnd + 1)
Next Cellule
For Each Cellule In Range("MA_PLAGE")
Cellule.Value = Cellule.Value * 3
Next Cellule
End Sub
Sub majChrono()
Sheets("Chrono").Range("CHRONO") = Format((Timer() - Start) / 3600 / 24, "hh:mm:ss")
ProchainChrono = Now + TimeValue("00:00:1")
Application.OnTime ProchainChrono, "majChrono"
End Sub
Sub Arret()
On Error Resume Next
Application.OnTime ProchainChrono, Procedure:="majChrono", Schedule:=False
End Sub