VBA Code to double click
Posted: Fri Nov 07, 2008 12:47 am
Hi All
I am creating a report in Excel and used a Dynamic slice so that the user can drill down. The formating of the row dimension is not ideal and had for the user to follow as they drill down since we have a fragment Heirarchy. So what I did was add another column and used excel formula to insert space infront of the element in the row dimention so the dimention steps everytime we drill (see attached image "Report"). Column A has the Excel formula and column B has the element from the TM1 Dimentions called "Account"
The problem i am now having is that I want to be able to double click on the Excel formated line (Column A) to drill down but TM1 does not allow it.
what I then tried is using VBA. See code
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Worksheets("Sheet2").Activate
ActiveCell.Offset(0, 1).Activate
Application.DoubleClick
ActiveCell.Offset(0, -1).Activate
Cancel = True
End Sub
Please help....anyone..... please lol
I am creating a report in Excel and used a Dynamic slice so that the user can drill down. The formating of the row dimension is not ideal and had for the user to follow as they drill down since we have a fragment Heirarchy. So what I did was add another column and used excel formula to insert space infront of the element in the row dimention so the dimention steps everytime we drill (see attached image "Report"). Column A has the Excel formula and column B has the element from the TM1 Dimentions called "Account"
The problem i am now having is that I want to be able to double click on the Excel formated line (Column A) to drill down but TM1 does not allow it.
what I then tried is using VBA. See code
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Worksheets("Sheet2").Activate
ActiveCell.Offset(0, 1).Activate
Application.DoubleClick
ActiveCell.Offset(0, -1).Activate
Cancel = True
End Sub
Please help....anyone..... please lol
