Hi
I want to create Break tracker after double click on particular range double click then insert current time & lock that cells no need to input apart from double click insert any value
Not able to edit that cell after insert time please tell me how to do this
I want to create Break tracker after double click on particular range double click then insert current time & lock that cells no need to input apart from double click insert any value
Not able to edit that cell after insert time please tell me how to do this
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
On Error Resume Next
Dim rng As Range
Set rng = Range("TimeEntry")
If Target.Count > 1 Then Exit Sub
If Not Intersect(Target, rng) Is Nothing Then
Application.EnableEvents = False
Cancel = True 'stop the edit mode
With Target
If .Value = "" Then
.Value = Time
.Offset(0, 1).Activate
End If
End With
End If
Application.EnableEvents = True
End Sub