From what I've gathered, this should work:
Option Explicit
#If VBA7 Then
Private mlngStart As LongPtr
#Else
Private mlngStart As Long
#End If
#If VBA7 Then
Private Declare PtrSafe Function GetTickCount Lib "kernel32" () As LongPtr
#Else
Private Declare Function GetTickCount Lib "kernel32" () As Long
#End If
Public Sub StartTimer()
mlngStart = GetTickCount
End Sub
But I'm not sure about the correct syntax for this:
Public Function EndTimer() As LongPtr
EndTimer = (GetTickCount - mlngStart)
End Function
Bookmarks