Quote Originally Posted by Logit View Post
.
Here are two projects you might be able to use to get started with. I've not utilized a CARD READER so won't be of any assistance to you.
However, if you can get the card data to populate the correct fields, shouldn't be a problem ?

This is only one example macro. There are two projects attached :

Option Explicit

Dim CM As Boolean

Private Sub cmdLogin_Click()

With Worksheets("May_1st").Range("A65536").End(xlUp)
    .Offset(1, 0) = UserForm1.txtName.Value
    .Offset(1, 1) = UserForm1.txtEmpID.Value
    .Offset(1, 2) = UserForm1.txtTime.Value
End With

'Unload Me 'Optional: Close Userform1

'cmdLogin.Enabled = False
txtName.Value = ""
txtEmpID.Value = ""
txtEmpID.SetFocus

End Sub

Private Sub cmdLogOut_Click()

'Worksheets("May_1st").Range("D65536").End(xlUp).Offset(1) = Format(Now, "hh:mm:ss")

'Unload Me 'Optional: Close Userform On Where Logout Button Is

Dim myLog As Worksheet
Dim myLogSheet As Range

Set myLog = Sheets("May_1st")
Set myLogSheet = myLog.Range("B:B").Find(txtEmpID.Value, , , xlWhole)

If Not myLogSheet Is Nothing Then
myLogSheet.Offset(0, 2) = Format(Now, "hh:mm:ss")

Else
txtName.Value = "XXX"

End If

txtName.Value = ""
txtEmpID.Value = ""
txtEmpID.SetFocus


End Sub

Private Sub txtEmpID_Change()

Dim mySheet As Worksheet
Dim myRange As Range

Set mySheet = Sheets("Emp_ID")
Set myRange = mySheet.Range("B:B").Find(txtEmpID.Value, , , xlWhole)

If Not myRange Is Nothing Then
txtName.Value = myRange.Offset(0, -1)
Else
txtName.Value = "Match not found"
End If

End Sub

Private Sub UserForm_activate()

'Do
'If CM = True Then Exit Sub
'txtTime = Format(Now, "hh:mm:ss")
'DoEvents
'Loop

Do While CM = False
UserForm1.txtTime = Format(Now, "hh:mm:ss")
DoEvents
Loop

'txtEmpID.SetFocus

End Sub

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)

CM = True

End Sub

Thank you so much for your assistance! I really appreciate your help and your time but I have never used the macro functionality. I wanted this excel sheet to be function based so I won't need to know Macro. I also want everyone who is not familiar with excel to be able uses this.
As for the Id Card reader, it is a simple device which only uses excel sheets to store any incoming data. You can just ignore it. Basically, it's automatically fill data for a cell that and moves down(so no need to press enter).

Here's what I have so far. (if you fill data any cell of A column and press enter )
Attendace Log Trail.xlsx