DBarley17022
New Member
- Joined
- Feb 26, 2019
- Messages
- 4
I have a sign in/out sheet That Columns D2:2000, E2:2000 once double clicked enter current time. what I need is that It can be only double click. and not manually entered. I already have the VBA code that enters current time on double click.
Current codes are;
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Not Intersect(Target, Range("A2:A2000")) Is Nothing Then
Target.Value = Date
Cancel = True
ElseIf Not Intersect(Target, Range("D2:D2000,E2:E2000")) Is Nothing Then
Target.Value = Time
Cancel = True
End If
End Sub
any suggestion would be helpful.
Current codes are;
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Not Intersect(Target, Range("A2:A2000")) Is Nothing Then
Target.Value = Date
Cancel = True
ElseIf Not Intersect(Target, Range("D2:D2000,E2:E2000")) Is Nothing Then
Target.Value = Time
Cancel = True
End If
End Sub
any suggestion would be helpful.