![]() |
trying to create a time sheet with clickable buttons
i want a clock in, lunch out, lunch in, and clock out button that will
automatically enter current date and time in a new row each day - it seems like something that would already be templated, but i have searched the web high and dry and have found nothing (well at least free!!) Can anyone please help? |
trying to create a time sheet with clickable buttons
In A1 thru D1 enter:
Clock In Lunch Out Lunch In Clock Out then enter this event macro in the worksheet code area: Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Set r = Range("A:D") Set t = Target If Intersect(t, r) Is Nothing Then Exit Sub If t.Value < "" Then Exit Sub Cancel = True t.Value = Now End Sub Now a double-click in a cell in columns A thru D will result in the date/time being entered in the cell. -- Gary''s Student - gsnu200842 "tarabull" wrote: i want a clock in, lunch out, lunch in, and clock out button that will automatically enter current date and time in a new row each day - it seems like something that would already be templated, but i have searched the web high and dry and have found nothing (well at least free!!) Can anyone please help? |
All times are GMT +1. The time now is 02:30 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com