Remember I found the "ms" format for the Format() statement? Well, I've never been convinced that it really displays the actual milliseconds part of the time. Not sure if I read something somewhere or what.

Anyway, a simple Windows API call is reliable and too easy to use:

Private Declare Function GetTickCount Lib "kernel32" () As Long

Dim TimeStart as long
Dim TimeElapsed as long

TimeStart = GetTickCount

For i = 1 to whatever
'Your code here

TimeElapsed = GetTickCount - TimeStart
Debug.Print "Elapsed time = " & CStr(TimeElapsed / 1000) & " seconds."