Hi guys,
I have a problem with my pivot table. What I am trying to do is create a userform that allows people to input up to five customer IDs and then format the pivot table accordingly.
I have been able to hide all pivot items, but making the requested items seems to be more problematic. The following code does work:
It succesfully make customer "1234567" visible. But when I try to do it by using the variable from the userform the code gives me the '1004' error. This is the code:Code:With ActiveSheet.PivotTables("PivotTable4").PivotFields("Sold-to Party") .PivotItems("1234567").Visible = True End With
Anyone have an idea why it doesn't work like this?Code:Public ComboBox1 As Integer With ActiveSheet.PivotTables("PivotTable4").PivotFields("Sold-to Party") .PivotItems(ComboBox1).Visible = True End With
Hi,
For your info, Debra has a whole set of solutions ...
http://www.contextures.com/xlPivot03.html
HTH
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks