ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help With Formatting Timer Please (https://www.excelbanter.com/excel-programming/321294-help-formatting-timer-please.html)

Paul Black[_2_]

Help With Formatting Timer Please
 
Hi Everyone,

I have a Macro that I want to Time.
I have Added at the Beginning …

Dim Start As Double
Start = Timer

… and at the End Before the End Sub …

ActiveCell.Offset(8, 0) = Format(Timer - Start, "0.00") / 60 & "
Minutes"

Why Does it Give me More Decimal Places than I have Specified?.
Ideally, I would like it to Show in Hours, Minutes and Seconds,
Something Like 00.00.00.
Any Help will be Appreciated.

All the Best
Paul




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Tom Ogilvy

Help With Formatting Timer Please
 
ActiveCell.Offset(8, 0) = Format((Timer - Start)/60, "0.00") & "Minutes"

--
Regards,
Tom Ogilvy

"Paul Black" wrote in message
...
Hi Everyone,

I have a Macro that I want to Time.
I have Added at the Beginning .

Dim Start As Double
Start = Timer

. and at the End Before the End Sub .

ActiveCell.Offset(8, 0) = Format(Timer - Start, "0.00") / 60 & "
Minutes"

Why Does it Give me More Decimal Places than I have Specified?.
Ideally, I would like it to Show in Hours, Minutes and Seconds,
Something Like 00.00.00.
Any Help will be Appreciated.

All the Best
Paul




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!




Paul Black[_2_]

Help With Formatting Timer Please
 
Thanks Tom.
How would I get it to show in the Format for Hours, Minutes & Seconds (
"00.00.00" ) Please. I have tried Several ways But to NO Avail.
Also, Does Including a Timer in the Code Slow Down the Macro.

Thanks in Advance.
All the Best
Paul



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Paul Black[_2_]

Help With Formatting Timer Please
 
Hi,

Not to Worry, I have Worked it out.
For Anybody that is Interested this is what I Used :-

ActiveCell.Offset(8, -1) = "This Program Took " & Format(((Timer -
Start) / 24 / 60 / 60), "hh:mm:ss"") & " To Process"

All the Best
Paul


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Tom Ogilvy

Help With Formatting Timer Please
 
ActiveCell.Offset(8, 0) = Format((Timer - Start)/60#/60#/24#, "h:mm:ss")

I wouldn't think it would slow it down since it is only two extra calls or
so.

--
Regards,
Tom Ogilvy



"Paul Black" wrote in message
...
Thanks Tom.
How would I get it to show in the Format for Hours, Minutes & Seconds (
"00.00.00" ) Please. I have tried Several ways But to NO Avail.
Also, Does Including a Timer in the Code Slow Down the Macro.

Thanks in Advance.
All the Best
Paul



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!





All times are GMT +1. The time now is 12:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com