Help With Formatting Timer Please

P

Paul Black

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
 
P

Paul Black

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
 
P

Paul Black

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
 
T

Tom Ogilvy

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top