Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
cb cb is offline
external usenet poster
 
Posts: 1
Default 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!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot Table Hide Selected Field 2007 M Masalha Excel Discussion (Misc queries) 0 December 24th 09 05:13 AM
Hide "Show details" when right click on data field in Pivot Table Anh Tuan Excel Discussion (Misc queries) 0 June 18th 09 07:57 AM
Calculated Field in Pivot Table Based On Totals-and hide a data fi Leo Demarce Excel Discussion (Misc queries) 3 February 6th 09 07:27 PM
Automatically Hide Pivot Table Field List Box RB Excel Discussion (Misc queries) 1 May 28th 07 12:21 PM
How do i hide the field list in a pivot table? sherobot Excel Discussion (Misc queries) 0 May 9th 06 12:30 AM


All times are GMT +1. The time now is 10:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"