Kumar Shanmugam
Member
I am facing a problem in
Create connection between Excel pivot filter and Combo box
I went through the tutorial link: http://www.datapigtechnologies.com/flashfiles/pivot10.html
The code works fine where combo box is in same sheet of pivot summary. but if i move combo box to a separate Sheet ("Dashboard"). The code is not working. I am getting error:
Runtime Error 1004: Unable to get the PivotTables property of the Worksheet class
What should i do to change the code if i want to place combo box in a separate sheet.
Please help in fixing the below code
Create connection between Excel pivot filter and Combo box
I went through the tutorial link: http://www.datapigtechnologies.com/flashfiles/pivot10.html
The code works fine where combo box is in same sheet of pivot summary. but if i move combo box to a separate Sheet ("Dashboard"). The code is not working. I am getting error:
Runtime Error 1004: Unable to get the PivotTables property of the Worksheet class
What should i do to change the code if i want to place combo box in a separate sheet.
Please help in fixing the below code
Code:
Sub Dealerselect()
'
' vehicleandealerselect Macro
'
'
Sheets("Pivot").Select
ActiveSheet.PivotTables("Pivotdealer").PivotFields("BRANCH").ClearAllFilters
ActiveSheet.PivotTables("Pivotdealer").PivotFields("BRANCH").CurrentPage = Range("BB13").Text
Range("AO11").Select
End Sub
Sub Vehicleselect()
'
' Vehicleselect Macro
'
'
Sheets("Pivot").Select
ActiveSheet.PivotTables("Pivotvehicle").PivotFields("BRANCH").ClearAllFilters
ActiveSheet.PivotTables("Pivotvehicle").PivotFields("BRANCH").CurrentPage = Range("BB13").Text
Range("BD9").Select
End Sub
Private Sub ComboBox1_DropButtonClick()
Call Vehicleselect
Call Dealerselect
End Sub
Last edited by a moderator: