Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to calculate time to rum a macro?
I have few langthy macros which are taking around 2-3 min.
I want to calculate the exact time taken by macro. Regards, Madiya |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to calculate time to rum a macro?
Dim sTime as Single
sTime = Timer 'your code here MsgBox Timer-sTime Madiya wrote: I have few langthy macros which are taking around 2-3 min. I want to calculate the exact time taken by macro. Regards, Madiya |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to calculate time to rum a macro?
You can try something like the following:
Sub AAA() Dim StartTime As Double Dim EndTime As Double StartTime = Now ''''''''''''''''''''''''''''''''''''' ' your code here ''''''''''''''''''''''''''''''''''''' EndTime = Now Debug.Print "Time To Run: " & _ Format((EndTime - StartTime) * 24 * 60 * 60, "#,##0") & " seconds" End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel, 10 Years Pearson Software Consulting www.cpearson.com (email on the web site) "Madiya" wrote in message ps.com... I have few langthy macros which are taking around 2-3 min. I want to calculate the exact time taken by macro. Regards, Madiya |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to calculate time to rum a macro?
On Oct 11, 6:41 pm, "Chip Pearson" wrote:
You can try something like the following: Sub AAA() Dim StartTime As Double Dim EndTime As Double StartTime = Now ''''''''''''''''''''''''''''''''''''' ' your code here ''''''''''''''''''''''''''''''''''''' EndTime = Now Debug.Print "Time To Run: " & _ Format((EndTime - StartTime) * 24 * 60 * 60, "#,##0") & " seconds" End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel, 10 Years Pearson Software Consultingwww.cpearson.com (email on the web site) "Madiya" wrote in message ps.com... I have few langthy macros which are taking around 2-3 min. I want to calculate the exact time taken by macro. Regards, Madiya- Hide quoted text - - Show quoted text - JW and Chip, Thank you for your prompt response. both are working fine. I love this group coz every one is ready to help. Regards, Madiya. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 calculate time between 2 date/time columns | Excel Discussion (Misc queries) | |||
Calculate Ending time using Start Time and Elapsed Time | Excel Worksheet Functions | |||
calculate hours using start time & end time, excluding weekends | Excel Programming | |||
IF statement to calculate time usage in specific time bands | Excel Worksheet Functions | |||
how to calculate time start & time finish in quarter hour | Excel Discussion (Misc queries) |