View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
witek witek is offline
external usenet poster
 
Posts: 69
Default Time to complete code/function

John wrote:
Is there a way for VBA to capture how long it takes for a piece of code or
user defined function to run? Like how fast it is on calculating a simple
UDF?


:)

Declare Function GetTickCount Lib "kernel32" () As Long


Dim longStart As Long, longStop As Long
longStart = GetTickCount
......
longStop = GetTickCount