Consulting

Results 1 to 2 of 2

Thread: Need help counting time spent in presentation

  1. #1
    VBAX Newbie
    Joined
    May 2016
    Posts
    1
    Location

    Need help counting time spent in presentation

    I have a presentation that will be used by an operator to assemble a piece of equipment.
    I need to account for the time used in the assembly process.
    Timer will start when clicking the Start button on first slide. Timer will stop when clicking "Assembly Completed" on last slide.
    Time will not be visible to the operator. Time will be sent to report in MS Word.

    So far I think I can use DateDiff to get time difference from start to finish.

    Can anybody help??

    Thanks.

  2. #2
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    Will this assembly be completed in one session of PP?

    DateDiff will work but so will
    Dim StartTime as Double
    Dim EndTime As Double
    Dim Duration As String 
    
    'OnStart: StartTime = CDbl(Now)
    'OnCompletion: EndTime = CDbl(Now)
    
    Duration = Format(EndTime - StartTime, "[h]:mm")
    Microsoft stores DateTimes as decimal numbers, counting days from 1/1/1900 (usually.) Times are stored as decimal fractions of one day (1/(24x60x60x10n)). I don't know the value of n, but it works out to about 11 decimal places of Time.

    Do you have to account for work breaks?
    I expect the student to do their homework and find all the errrors I leeve in.


    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
  •