Re: Calculate Duration.



Hi Art

Sub test()
Dim t As Date, tt As Date
t = Now
'Your code
tt = Now
MsgBox Format((tt - t), "hh:mm:ss")
End Sub
--


XL2003
Regards

William
willwest22@xxxxxxxxx


"Art" <Art@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:EAEA51AD-1838-4725-9E7D-48EF22FF1B66@xxxxxxxxxxxxxxxx
> Need Help..
>
> I would like to subtract the end time(hh:mm:ss) from the start
> time(hh:mm:ss) to get the duration (HH:MM:SS) of how long a job took to
> process.
>
> Thanks.
>


.



Relevant Pages

  • Re: page break after
    ... "William" wrote: ... > Sub test() ... > Dim c As Range, ... >> bob, bob and john. ...
    (microsoft.public.excel.programming)
  • Re: Deleting cells in a row
    ... Regards ... > William, this works fine except the macro moves the data from the cells ... > below up into the just-cleared cells. ... >> Sub Test() ...
    (microsoft.public.excel.programming)
  • Re: Find Files
    ... ..SearchSubFolders = True ... Regards ... William ... > Sub test() ...
    (microsoft.public.excel.programming)
  • Re: Find Files
    ... Regards ... William ... >> .SearchSubFolders = True ... >>> Sub test() ...
    (microsoft.public.excel.programming)
  • Re: VBA code for Excel File Save As
    ... > Sub Test() ... > Dim fname As Variant ... > Regards Ron de Bruin ... I would like to be prompted for this but it only saves if I specify the path. ...
    (microsoft.public.excel.programming)