Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default 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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default 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!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default 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!
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Timer Vijay Excel Worksheet Functions 1 April 6th 07 11:00 AM
Stopping a Timer / Running a timer simultaneously on Excel Paul23 Excel Discussion (Misc queries) 1 March 10th 06 12:08 PM
timer dadad Excel Programming 5 December 1st 04 01:46 AM
Timer Phil Excel Programming 4 February 6th 04 01:58 PM
Timer Don Lloyd Excel Programming 2 October 17th 03 12:33 PM


All times are GMT +1. The time now is 01:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"