Hello Friends,
Here is the code which I am using. How to restrict the code to trigger only if double click on the target cell.
As of now the code is triggered when the target cell is selected and if double clicked on any other locked cell.
Any help would be appreciated.
Regards,
Humayun
Here is the code which I am using. How to restrict the code to trigger only if double click on the target cell.
As of now the code is triggered when the target cell is selected and if double clicked on any other locked cell.
VBA Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("dates_others")) Is Nothing Then
Cancel = True
Select Case (Target)
Case "": Target.Value = Date
Case Date: Target.Value = "Not Applicable"
Case "Not Applicable": Target.ClearContents
End Select
End If
End Sub
Any help would be appreciated.
Regards,
Humayun