N
newbie
The problem is about VBA programming with pivot tables
created using OLAP cubes.
I am using the following code to hide a row item of a
pivot table created from an OLAP Cube. I get an error in
the second line:
----------------------------------------
Run Time error 1004
Unable to set the visible property of the pivot item class
-----------------------------------------
------------
Worksheets("sheet1").PivotTables(1) _
..PivotFields("[Project].[Project Name]").AutoSort
xlManual, "[Project].[Project Name]"
Worksheets("sheet1").PivotTables(1) _
..PivotFields("[Project].[Project Name]").PivotItems
("[Project].[All Project].[ProjectA]").Visible = False
-----------
This code works properly with pivot table created from
excel sheet data but not with pivot tables created using
OLAP cubes.
I get this error whatever way I alter the visible
property of a pivot item. This error can be reproduced
easily by using the sample foodmart cube.
Any ideas?
Thanks!!
created using OLAP cubes.
I am using the following code to hide a row item of a
pivot table created from an OLAP Cube. I get an error in
the second line:
----------------------------------------
Run Time error 1004
Unable to set the visible property of the pivot item class
-----------------------------------------
------------
Worksheets("sheet1").PivotTables(1) _
..PivotFields("[Project].[Project Name]").AutoSort
xlManual, "[Project].[Project Name]"
Worksheets("sheet1").PivotTables(1) _
..PivotFields("[Project].[Project Name]").PivotItems
("[Project].[All Project].[ProjectA]").Visible = False
-----------
This code works properly with pivot table created from
excel sheet data but not with pivot tables created using
OLAP cubes.
I get this error whatever way I alter the visible
property of a pivot item. This error can be reproduced
easily by using the sample foodmart cube.
Any ideas?
Thanks!!