Advertisement
dave3009

Jasen2

May 3rd, 2020
1,014
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Option Explicit
  2.  
  3. Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
  4. Cancel = True ' turn off default action for doule click
  5.    ' assumes you only have 1 list object on the sheet. If not you can be
  6.    ' explicit by changing ListObjects(1) to ListObjects("ActualTableName")
  7.    If Not Intersect(Target, ListObjects(1).DataBodyRange) Is Nothing Then
  8.            
  9.         'your code here
  10.    
  11.     End If
  12. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement