Creating clock in and out with just a click of a button

YooooowaN

New Member
Joined
Mar 19, 2005
Messages
33
I'd like to create a spreadsheet wherein employees can just click on a button each time they go in and out of break. I'd like to monitor who's going on over break. Is this possible?

Thanks
 
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
 
Upvote 0

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
i want to add two buttons one for sing in and one for sign out but both the time employee should be asked for employee id and after that it should prompt for sing in or sing out. and the time should go to the appropriate column

plz help
 
Upvote 0

Forum statistics

Threads
1,215,831
Messages
6,127,140
Members
449,362
Latest member
Bracelane

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top