I would like to have it so that when you double click on a cell (any cell in my workbook) you trigger an event. I've tried all of these but none of them work. Is there a security setting in Excel that may be blocking this type of code?
VBA Code:
Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Stop
End Sub
Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
If Sh.Name <> "Data" Then Exit Sub
Cancel = True
Global_Filter
End Sub
Private Sub Workbook_SheetBeforeDoubleClick_2(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
If Sh.Name <> "Data" Then Exit Sub
Cancel = True
If Not Intersect(Target, Sh.Range("A1:F1")) Is Nothing Then
Global_Filter
ElseIf Target.Address(0, 0) = "J1" Then
Sh.ShowAllData
End If
End Sub