Code: Select all
Private Declare Function GetTickCount Lib "kernel32" () As Long ‘For timer
Code: Select all
Dim dtStart As Long
Dim dtEnd As Long
Dim result As Long
Dim i As Integer
dtStart = GetTickCount
'Function to profile
dtEnd = GetTickCount
result = dtEnd – dtStart
MsgBox “Duration is ” & result & ” milliseconds.”