Private Declare Function GetTickCount& Lib "kernel32" ()
Private Sub elapse()
'Get the tickcount
Dim Debut&, reponse
Debut& = GetTickCount&
reponse = MsgBox(Now(), vbOKCancel + vbInformation, "Chrono en cours")
encore:
If reponse = vbCancel Then
MsgBox "temps final " _
& Chr(10) & (GetTickCount& - Debut&) / 1000 & " secondes"
Else
reponse = MsgBox("temps intermediaire :" _
& Chr(10) & (GetTickCount& - Debut&) / 1000 & " secondes", _
vbOKCancel + vbQuestion, "Encore ?")
GoTo encore
End If
End Sub