А вот так будет получше:
Declare Function GetTickCount Lib "kernel32.dll" () As Long
dim t as long
t=GetTickCount()
' код
t=GetTickCount-t ' в миллисекундах
p.s. еще лучше юзать timeGetTime(Declare Function timeGetTime Lib "winmm.dll" () As Long), а само точно - Declare Function QueryPerformanceFrequency Lib "kernel32" (lpFrequency As Long) As Long
