Consulting

Results 1 to 4 of 4

Thread: Solved: Understanding VBA minutes

  1. #1
    VBAX Regular Darren's Avatar
    Joined
    Feb 2005
    Posts
    98
    Location

    Solved: Understanding VBA minutes

    Hi Captains

    This portion of the code was written by jonske.

    [VBA]Private Sub Workbook_Open()
    Dim StartTime#, CurrentTime#

    '*****************************************
    'SET YOUR OWN TRIAL PERIOD BELOW
    'Integers (1, 2, 3,...etc) = number of days use
    '1/24 = 1Hr, 1/48 = 30Mins, 1/144 = 10Mins use
    [/VBA]

    I would like to try and break down the 10 Min Use

    If 1/144 is 10 Min

    Would 1/244 be 5 min

    1 Min = 1/ ?

    Thanks for your help
    Darren
    South Africa
    Live by Ghandi and learn 1st by "Vbaexpress.com and then by Google" !!!

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    There are 24 hours in a day, 60 minutes in an hour, so 1 minute is

    1/24/60 or 1/1440

    2 minutes are

    1/1440*2 or 2/1440 or 1/720

    5 minutes is

    5/1440 or 1/288

    etc.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Regular Darren's Avatar
    Joined
    Feb 2005
    Posts
    98
    Location
    Hi Bob

    Thanks for the prompt explanation.

    Darren
    South Africa
    Live by Ghandi and learn 1st by "Vbaexpress.com and then by Google" !!!

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Juts FYI, I tend to stick to the long style

    1/24/60

    and when I get to wseconds, I evene do

    1/24/60/60

    just helps to explain where the numbers come from to me.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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