Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Time comparison
Hi all
I am trying to figure out what section of my code is running the longest. how do i compare two times (ie subtract the two so that i can get a total time run) sub MyCode() dim t1, t2, total t1=time <my code t2=time total=<how do i work with the time here msgbox total end sub is this the correct way to do this or is there a better way? and secondly is there a way to write one sub and have it triggered any time that code is run, without putting a call to it in each of my functions? basically i want to see how long each section of my code takes to run, so i can see where the slowdowns are and possibly re-write, etc tia! J |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Time comparison
Hi,
t1=Timer( ) .... t2=Timer( ) total = t2-t1 -- Regards, Sébastien "Gixxer_J_97" wrote: Hi all I am trying to figure out what section of my code is running the longest. how do i compare two times (ie subtract the two so that i can get a total time run) sub MyCode() dim t1, t2, total t1=time <my code t2=time total=<how do i work with the time here msgbox total end sub is this the correct way to do this or is there a better way? and secondly is there a way to write one sub and have it triggered any time that code is run, without putting a call to it in each of my functions? basically i want to see how long each section of my code takes to run, so i can see where the slowdowns are and possibly re-write, etc tia! J |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Comparison | Excel Discussion (Misc queries) | |||
XLS comparison | Excel Discussion (Misc queries) | |||
Time comparison formula | Excel Discussion (Misc queries) | |||
Time/Data Comparison | Charts and Charting in Excel | |||
Comparison | Excel Programming |