vba time format milliseconds code example
Example: vba timestamp -- milliseconds
Public Function TimeInMS() As String
'The error is +/- 15 ms
TimeInMS = Strings.Format(Now, "dd-MMM-yyyy HH:nn:ss") & "." _
& Strings.Right(Strings.Format(Timer, "#0.00"), 2)
End Function