• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

log out time stamp

ryan guadalupe

New Member
hi guys,

I need help. I am creating a log in log out form for our company. My only problem is how could I time stamp the time if they want to log out. log in is working fine. what I want is after they log in, and they want to log out, it will find the last transaction that they made and time stamp for log out,

Please see the attached.
 
Check it..

Code:
Private Sub CommandButton1_Click()
Dim id As Double, r As Range, i As Integer

With Sheets("TRACKER")
    id = TextBox1.Text
    i = Application.CountA(.Columns(1)) + 1: If i < 2 Then GoTo N1:

        Set r = .Columns(2).Find(id, , , , xlByRows, xlPrevious)

        If Not r Is Nothing Then
            If Len(r.Offset(, 3)) = 0 Then r.Offset(, 3).Value = Format(Now(), "h:mm am/pm;@"): GoTo N2
        End If
N1:
        .Range("A" & i).Value = Format(Now(), "mm/dd/yy")
        .Range("B" & i).Value = id
        .Range("C" & i).Value = Label3.Caption
        .Range("D" & i).Value = Format(Now(), "h:mm am/pm;@")

End With

N2:
   
TextBox1.Value = ""
Label3.Caption = ""
Label1.Caption = "Please enter your employee ID:"
Label2.Visible = False
Label3.Visible = False
Label4.Visible = False
Label6.Visible = False
Label7.Visible = False
TextBox2.Visible = False
CommandButton1.Visible = False
   
End Sub
 
I also noticed that I can only save one employee id at a time. If I enter, let say 424091, and hit enter, it will show in tracker, and if I enter again 424091 it will show time out. If i enter again the same id, it will no longer show in the tracker. It should show another log in for 424091 id.
 
Last edited:
I also noticed that I can only save one employee id at a time.
Means??

If I enter, let say 424091, and hit enter, it will show in tracker, and if I enter again 424091 it will show time out. If i enter again the same id, it will no longer show in the tracker. It should show another log in for 424091 id.

I have thought the same way too & written the code based on that, It must to deliver the same.
 
Everything is working fine, Thank you. I added additional form for changing the password. The default password is 123, if the user will enter an id which has a default password in the DATA sheet, it will show a form to let the user update the password. My challenge now is, how to update the password if the user press the update password button.

Can you help me with this?
 

Attachments

I just want to ask, is it possible to have a real time digital clock? lol. So that user can see what is the current time. I tried searching, any codes but the it only shows the time, and its not moving (like a real time clock, moving seconds, minutes, etc)
 
I just want to ask, is it possible to have a real time digital clock? lol. So that user can see what is the current time. I tried searching, any codes but the it only shows the time, and its not moving (like a real time clock, moving seconds, minutes, etc)


It's not good idea to use the same as it will slow down the entire process.
 
Everything is working fine, Thank you. I added additional form for changing the password. The default password is 123, if the user will enter an id which has a default password in the DATA sheet, it will show a form to let the user update the password. My challenge now is, how to update the password if the user press the update password button.

Can you help me with this?


Check it
 

Attachments

Back
Top