bonjour

voici les etapes de mon process:

Je démarre le chronometre avec le bouton play : OK
Je travaille sur la machine puis fait une pause car fin de journée par exemple :OK
Je sauvegarde le fichier XLS : OK
Le lendemain matin par exemple je réouvre le fichier, mon temps sauvegardé et toujours présent :OK
MAIS QUAND JE CLIQUE SUR CONTINUE MON COMPTEUR NE CONTINU PAS je pert donc le temp de la veille

merci d'avance de votre aide
voici le programme

Option Explicit

Dim ChronoEnCours As Boolean, Pause As Boolean
Dim Depart As Double, Temps As Double

Private Sub CommandButton1_Click()
' Bouton Play
If ChronoEnCours = True Then Exit Sub
ChronoEnCours = True
Depart = [now()]
Range("A4") = "00:00:00"
Chrono
End Sub

'Sub Compteur()
'Static S As Integer
' Do While Arret
' DoEvents
' If S <> Timer - T Then
' S = Timer - T
' [A4].Value = S
' End If
' Loop
'End Sub

Private Sub CommandButton2_Click()
' Bouton stop
ChronoEnCours = False
Pause = False
CommandButton3.Caption = "PAUSE"
End Sub

Private Sub CommandButton3_Click()
' Bouton Pause
If Pause = True Then
Pause = False
CommandButton3.Caption = "PAUSE"
Depart = [now()] - Temps
ElseIf ChronoEnCours Then
Pause = True
CommandButton3.Caption = "CONTINUE"
End If
End Sub

Sub Chrono()
Do While ChronoEnCours = True
If Pause = False Then
Temps = [now()] - Depart
End If
'Range("A4") = Format(Temps, "hh:mm:ss.00")
Range("A4") = Temps
DoEvents
Loop
End Sub