Is there a way to use VBA (excel) to generate a clock time with accuracy to a tenth of a second or less?
eg:
Sub test()
MsgBox Format(Time, \"hh:
I have noticed through some trial and error that current time is shown atleast upto 10 milliseconds if you assign a formula to a cell opposed to using the function directly in vba. I generally use the NOW() function for current time.
If my code is as follows:
sub test()
cells(1,1)=now()
end sub
then cell A1 shows time upto seconds, not milliseconds (time would be shown as 10:38:25.000)
if I use this code:
sub test()
cells(2,1).formula "=now()"
cells(1,1)=cells(2,1)
end sub
Then time is shown upto milliseconds in A1 (time would be shown as 10:38:25.851)