Syntax
Time$([SerialNumber])
Remarks
Returns a time corresponding to SerialNumber, a decimal representation of the date, time, or both. If SerialNumber is omitted, Time$() returns the current time. For information about serial numbers, see DateSerial().
The time format is determined by the "TimeFormat=" line in the [Microsoft Word] section of WINWORD6.INI (Windows 3.x), Word Settings (6) (Macintosh), or the registry (Windows 95 and Windows NT). (In Windows 3.x, if there is no "TimeFormat=" line, Time$() uses the time settings in the [intl] section of WIN.INI.) Within a macro, you can use SetPrivateProfileString to change the current time format.
Example
When included at the end of a macro, this example displays a message box showing the time the macro finished running:
MsgBox "The macro finished at " + Time$()
See Also
Date$(), DateSerial(), GetPrivateProfileString$(), Hour(), Minute(), Now(), Second(), SetPrivateProfileString, TimeSerial(), TimeValue()