Hello, as soon as I open my file I receive this error.
Run-time error 1004: Unable to get the PivotTables property of the Worksheet class
This error arose when I made my combo box (active x) = fmStyleDropDownList in properties. My combo box is linked to a pivot table filter which is controlled by VBA. I verified the name of the pivot table and it looks correct. If I the style in combo box properties is switched back to fmstyledropdowncombo it works again.
I would like to keep the style as fmStyleDropDownList as I don't want the user changing the contents of the dropdown.
any insight would be very helpful.
Private Sub ComboBox1_Change()
ActiveSheet.PivotTables("PivotTable55").PivotFields("MEASURE").CurrentPage = Range("AF11").Text
End Sub
Private Sub ComboBox2_Change()
ActiveSheet.PivotTables("PivotTable55").PivotFields("PERIOD").CurrentPage = Range("AG11").Text
End Sub
Private Sub ComboBox3_Change()
ActiveSheet.PivotTables("PivotTable55").PivotFields("REGION").CurrentPage = Range("AH11").Text
End Sub
Private Sub ComboBox4_Change()
ActiveSheet.PivotTables("PivotTable55").PivotFields("VENDOR").CurrentPage = Range("AI11").Text
End Sub
Bookmarks