So I am attempting to build a sheet to track numbers being entered. I've got it so I can double click a cell and it time stamps the date and time. This is where I need help. I have two areas I would like this to happen on the same sheet. Both cells labeled " Transferred " need to be able to be clicked. I also want the date fields to be locked so not to be tampered with after entered, however when I lock the cells I get a debug error as soon as I double click. I've included a picture of what I'm referring to as well as the worksheet.
The code I'm using is:
Any suggestions would be very much appreciated!PHP Code:
Option Explicit
Dim lrow As Long
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
lrow = Cells(Rows.Count, 1).End(xlUp).Row
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("B3:B" & lrow)) Is Nothing Then
Target.Font.Name = "Marlett"
If Target = vbNullString Then
Target = "b"
Else
Target = vbNullString
End If
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
lrow = Cells(Rows.Count, 1).End(xlUp).Row
If Not Intersect(Target, Range("B3:B" & lrow)) Is Nothing Then
If Target.Value = "b" Then
Target.Offset(0, 1).Value = Format(Now, "mm/dd/yy,hh:mm")
End If
End If
Test Worksheet.xlsm
Two Check Boxes.PNG
Bookmarks