I had used VB6 up until ~2 years ago, so I've forgotten some things.

I'm now maintaining some Excel VBA macros which is reprocessing a text file, then displays stuff about the file in a spreadhseet

I'd like to measure the time it takes to process the file, but can't seem to find the right functions to do it. I only need 1-second resolution.

I've looked through VBA in a nutshell, but the time-related calls dont seem to do what I need (or I'm not looking in the right place.

StartTime = SomeTimeFunction()

' code to process the file

StopTime = SomeTimeFunction()

Elapsed = (StopTime-StartTime)


I've though about adding a timer using 1-second callbacks, to increment a count, but I can't seem to add any VB controls to the Control Pallete in The VBA Editor in Excel 2003.

(VB6 let me add tons of controls.)

Does anyone have any code I can look at to get the elapsed time in seconds?

thanks