Private Sub Command1_Click()
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