好久没有更新了,放一段新的代码 通过系统api时间来调出系统时间(milseconds模式) Private Type SYSTEMTIME Year As Integer Month As Integer DayOfWeek As Integer Day As Integer Hour As Integer Minute As Integer Second As Integer Milliseconds As Integer End Type Private Declare Sub GetSystemTime Lib "kernel32" (lpSystemTime As SYSTEMTIME) Public Function GetTime() As String Dim tSystem As SYSTEMTIME GetSystemTime tSystem GetTime = DateDiff("s", DateSerial(1970, 1, 1), DateSerial(tSystem.Year, tSystem.Month, tSystem.Day) + TimeSerial(tSystem.Hour, tSystem.Minute, tSystem.Second)) * 1000 + Format(tSystem.Milliseconds, "000") End Function