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
You can also check out the timesheet solutions at
www.ozgrid.com for some ideas.
Note that anything's possible, but (and it's a big but) you're relying on employees to be honest about their time, specifically, when they go over their alotted break time. What's to keep someone else from logging in for them? Excel's security is notoriously weak, so someone can pretty quickly figure out how to alter/defeat an Excel solution.
As someone who has punched timecards for late emloyees (in my youth), I can tell you that no system is infallible. You're relying on the "locks on doors" principle, in that they only keep honest people honest.
We use phone log in's for our telemarketers (which can easily be defeated by a co-worker logging in for someone else), and biometric readers for our operations folks. Now that's a good investment, because it can't be cheated (unless you give someone your hand).
From what I've found, the best way to manage employee timeliness or tardiness is to actually manage to it. If there's a problem, you keep the records, not them. Cheaters and slackers will try their damndest to break whatever system you put in place; only good management skills and intuition will bust that.
Sorry for the rant (but we deal with it all the time) & hope that helps,
Smitty
(Heya Ace! Nice rainy day here and I'm looking at/drooling on my Chugach Mountain Guide (avoiding housework))