Chronomêtre sous excel
Résolu
eimoju
Messages postés
2
Date d'inscription
Statut
Membre
Dernière intervention
-
Mike-31 Messages postés 18405 Date d'inscription Statut Contributeur Dernière intervention -
Mike-31 Messages postés 18405 Date d'inscription Statut Contributeur Dernière intervention -
Bonjour,
Je viens de faire ce chronométré sur une feuille excel , mais je voudrai que quand je clique sur stop il se remette à o
Option Explicit
Dim ChronoEnCours As Boolean, Pause As Boolean
Dim Depart As Double, Temps As Double
Private Sub CommandButton1_Click()
' Bouton Marche
ChronoEnCours = True
Depart = [now()]
Range("A4") = "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, "mm:ss,00")
Range("A4") = Temps
DoEvents
Loop
End Sub
merci par avnce
Je viens de faire ce chronométré sur une feuille excel , mais je voudrai que quand je clique sur stop il se remette à o
Option Explicit
Dim ChronoEnCours As Boolean, Pause As Boolean
Dim Depart As Double, Temps As Double
Private Sub CommandButton1_Click()
' Bouton Marche
ChronoEnCours = True
Depart = [now()]
Range("A4") = "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, "mm:ss,00")
Range("A4") = Temps
DoEvents
Loop
End Sub
merci par avnce
A voir également:
- Chrono excel
- Liste déroulante excel - Guide
- Word et excel gratuit - Guide
- Déplacer colonne excel - Guide
- Si ou excel - Guide
- Excel moyenne - Guide
Merci pour ta réponse s'est juste ce qu'il me fait.
Merci beaucoup