I'm working on speeding up a very long and complex script, and I wanted to be able to benchmark improvements I make to it, as well as how fast it runs on various machines.

What script can I use to measure two points in time?

I am assuming I would do something like

sub startcode

(get the current time)


(long complicated script goes here)



(get the ending time)

dim timetaken as (i dont know what the proper variable would be)

timetaken = (ending time) - (starting time)

msgbox "Time taken: " & timetaken 






end sub