|
-
January 28th, 2008, 10:08 PM
#1
Simple timing measurements in VBA
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|