View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Get Milliseconds in a timestamp


Sub TTT()
Dim strType As String
strType = TypeName(Timer)
MsgBox strType
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"GS"
wrote in message
Hi Jim,
<AFAIK Timer() returns a Double because you can break it down to a decimal
precision of a second. ie:

Sub TimeEvents()
' use to time procedures or functions
Dim StartTime As Date, EndTime As Date
StartTime = Timer

'Run procedure

EndTime = Timer
MsgBox Format(EndTime - StartTime, "0.00")
End Sub
You modify the format here to increase or decrease the number of decimal
places.
Regards,
Garry