Excel Double Click on cell for DrillThrough
Posted: Thu Sep 23, 2010 2:30 am
Hi all. Below is code to enable double clicking on a cell to bring up the drill though selections (normally this is selected on by right clicking on a cell with the DBRW and selecting Drill). Just a neat way to use double clicking, The code needs to be on each worksheet that you want to enable this for:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
myWorkbookName = ThisWorkbook.Name
Application.Run ("Tm1p.xla!DoDrillCell")
If ActiveWorkbook.Name = myWorkbookName Then
Cancel = True
End
End If
End Sub
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
myWorkbookName = ThisWorkbook.Name
Application.Run ("Tm1p.xla!DoDrillCell")
If ActiveWorkbook.Name = myWorkbookName Then
Cancel = True
End
End If
End Sub