文件格式如下:11/28/2003 14:27:46 0E
11/28/2003 14:28:26 40
11/28/2003 14:33:21 0F
11/28/2003 14:34:09 0E
11/28/2003 14:34:50 40
11/28/2003 14:44:31 01最新纪录总是最后一条,前面两个是日期和时间最后一个是16进制数。
文件有记录条数和容量限制。
11/28/2003 14:28:26 40
11/28/2003 14:33:21 0F
11/28/2003 14:34:09 0E
11/28/2003 14:34:50 40
11/28/2003 14:44:31 01最新纪录总是最后一条,前面两个是日期和时间最后一个是16进制数。
文件有记录条数和容量限制。
MsgBox lastlog("d:\123.log")
End Sub
Function lastlog(ByVal logpath As String) As String
Dim temp As New Collection, x As String
Open logpath For Input As 1
Do While Not EOF(1)
Line Input #1, x
If x <> "" Then temp.Add x
Loop
Close 1
lastlog = temp(temp.Count)
Set temp = Nothing
End Function