Results 1 to 6 of 6

Thread: Assistance With Building Timer to Track Test Runs

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,709
    Location
    Static StartTime As Date
    Function AgeIn() As String
    If StartIme = 0 Then 
        StartTime = Now
        AgeIn = ""
    Else
       AgeIn = Format(Now - StartTime, "mm:ss.####)
       StartTime = 0
    End If
    End Function
    If AgeIn = "" Then DO Nothing
    IF AgeIn = (A value) then that is the process time

    Sub StartProcess
        ProcessTime = AgeIn 'Starts Timer
        'Blah
        'Blah
        'Blah
    End Sub
    Sub Process End
        'Blah
        'Blah
        'Blah
        Process Time  = AgeIn 'This is the Time
    End Sub
    Sub ReSetAgeIn()
       StartTime = ""
    EndSub
    If you use the MicroTimer, Do the conversions to decimal seconds after reading the value from Access.
    Last edited by SamT; 02-26-2022 at 12:11 PM.
    Please take the time to read the Forum FAQ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •