Need Help Please: Excel Click Timer to time each Work/Task
Solved/Closed
jsioson
Posts
3
Registration date
Tuesday September 3, 2013
Status
Member
Last seen
January 22, 2014
-
Sep 3, 2013 at 01:54 AM
jsioson Posts 3 Registration date Tuesday September 3, 2013 Status Member Last seen January 22, 2014 - Sep 11, 2013 at 11:47 PM
jsioson Posts 3 Registration date Tuesday September 3, 2013 Status Member Last seen January 22, 2014 - Sep 11, 2013 at 11:47 PM
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Sep 3, 2013 at 11:54 AM
Sep 3, 2013 at 11:54 AM
Hi Jus,
Single-click is not possible, hopefully you can muster the energie
to click one more time :) .
Here you go:
Remember to unblock the cells you don't want to protect.
Format cells to display time the way you want.
Best regards,
Trowa
Monday, Tuesday and Thursday are usually the days I'll respond. Bear this in mind when awaiting a reply.
Single-click is not possible, hopefully you can muster the energie
to click one more time :) .
Here you go:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Intersect(Target, Range("B2:G" & Rows.Count)) Is Nothing Then Exit Sub ActiveSheet.Unprotect Password:="Password" If Target.Value = vbNullString And Target.Offset(0, -1).Value <> vbNullString Then Target.Value = Time End If ActiveSheet.Protect Password:="Password" End Sub
Remember to unblock the cells you don't want to protect.
Format cells to display time the way you want.
Best regards,
Trowa
Monday, Tuesday and Thursday are usually the days I'll respond. Bear this in mind when awaiting a reply.
Sep 4, 2013 at 04:40 PM
Thanks so much! The code works great however, each time i double click the target cell, the protect window keeps on popping up.. Is there a way to avoid this? Also, is there a way for me to just choose certain columns/rows to protect instead of protecting the whole sheet?
Thanks a big bunch!
JUS
Sep 5, 2013 at 10:22 AM
To avoid the protect window to pop up you will need to refer to a cell at the end of the code.
So place "Range("B2").Select" or any other cell reference before the End Sub line.
For the other issue go to cell properties, right most tab called security. Here you will find the option to block/unblock cells.
I usually select all cells (ctrl+a) go to cell properties (ctrl+1), unblock, OK.
Then select all cells I want to block and go to cell properties to do so.
Good luck and let me know if modifications are desired.
Best regards,
Trowa
Sep 11, 2013 at 11:47 PM
Your a genius thanks a bunch!!