Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello-
I am trying to take selections from a ListBox (named Product_Codes) and use those selections in a pivot table. As a first step I am trying to deselect all items in a pivot field called "product_code" but I keep getting an error. Here is my code (sorry if it posts sloppy): [vb]Private Sub Create_Report_Click() Dim iCode As PivotItem Dim PT As PivotTable Set PT = Sheets("Network").PivotTables("PivotTable1") Application.ScreenUpdating = False ' Clear all Product Codes from Pivot Field "product_code" For Each iCode In PT.PivotFields("product_code").PivotItems PT.PivotFields("product_code").PivotItems(iCode).V isible = False 'Getting error here; Next iCode '"Unable to get PivotItems Property of the PivotField Class Application.screendupdating = True End Sub[/vb] I know it is difficult without seeing the userform or file, but any help is appreciated. Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pivot table - problem with field | Excel Discussion (Misc queries) | |||
Changing a field setting in a pivot table | Excel Discussion (Misc queries) | |||
Calculated field problem in a Pivot table | Excel Discussion (Misc queries) | |||
Changing field names without affecting pivot table | Excel Discussion (Misc queries) | |||
Changing field settings on multiple columns in pivot report...How | Charts and Charting in Excel |