![]() |
Hide a data field on a pivot table
We have pivottable templates that we refresh automatically on a nightly
basis using a VB program. We have about 120 different reports. Most all of the reports have the same data in them so if we want to change the reports we have to change about 100 pivot tables (8-12 sheets each). We have been able to reduce the number of templates somewhat by calling a procedure with different values in a variable. I am trying to reduce the number of table even more by putting 7 fields in the data area then programatically hide one of the data items depending on whether the jobe is a daily or weekly job. I have an item that when I record a macro to hide the item it gives me that following code which I can't get to run in the VB program. I keep getting the error 'Unable to set the Orientation property of the PivotField class' With xlWB.ActiveSheet.PivotTables("PivotTable1").PivotF ields("Lbs Diff") .Orientation = xlHidden End With "Lbs Diff" is actually the caption I believe. The acutal field is a field called "MTDLbsDiff" which is a calculated formula. Does anyone have any idea why the code won't work in my VB program? I would appreciate any help I can get. Thank you. Cat B *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
All times are GMT +1. The time now is 08:44 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com