Welcome to the Board!
Yes, you can do what you want. The following will prompt for an employee # and input the date & time in Sheet1:
Code:
Private Sub CommandButton1_Click()
Dim yourelate As String
Dim LastRow As Object
yourelate = Application.InputBox("Please enter employee ID #", "Employee ID", Type:=1)
Set LastRow = Sheets("Sheet2").Range("A65536").End(xlUp)
With LastRow
.Offset(1, 0) = yourelate
.Offset(1, 1) = Date
.Offset(1, 2) = Time
End With
End Sub
this code is very very useful. I need more help in this if you possibly could.
after asking for employee id i want to match it with the same row in the excel and when employee comes for sign out it should go to the next column and write the sign-out time
Employee_ID DATE Sign-in Sign-Out
something like this. i need two buttons one for sing in and one for signout...
plz help