Hello
Code:Private Sub Timer1_Timer() ' This will save last seen for your user ' Dim x, y in General ' Timer1.Interval = 777 x = Format$(Now, "Short Time") y = Format$(Now. "Short Date") Open "C:\MyLastSeen.dat" For Output As 1 Write #1, x, y Close End Sub Private Sub Timer2_Timer() ' This will load someone's last seen ' Dim xx, yy, zz in General ' Timer2.Interval = 777 On Error Resume Next Open "c:\User1.dat" For Input As 1 Input #1, xx, yy Close zz = DateDiff ("d", yy, Date) if zz = 0 Then Label1.Caption = "Last Seen Today at " & xx ElseIf zz = 1 Then Label1.Caption = "Last Seen Yesterday at " & xx ElseIf zz > 1 Then Label1.Caption = "Last Seen at " & xx & " on Date " & yy End if End Sub




Reply With Quote
