Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default ShowDetail on PivotTable does not work in VBA

I need to programmatically hide the details of one of my row fields in a
pivot table. Manually, you would select the field and click on the Hide
details icon (the yellow minus sign) in the pivot table toolbar.

Programmatically, I thought I needed to set the ShowDetails property of the
pivot item to False:

objSheet.Range("H6").ShowDetails = False

But that doesn't work, apparently, ShowDetails is not a property of the
Range object.

But, when I use the Excel recorder to create a macro for this I get the
following:

Range("G6").Select
Selection.ShowDetail = False

I tried using the Selection object and I still get the same error.

Note that I'm running the code from within MS Access, and I reference the
Excel object library.

Thanks in advance,

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
VB Help If Statement in Selection.ShowDetail = True TroyT Excel Programming 5 May 22nd 08 07:09 PM
Cannot copy PivotTable to Network, at work. PedroDC Excel Discussion (Misc queries) 0 February 22nd 07 01:02 PM
ShowDetail on PivotField rather than PivotItem?? [email protected] Excel Programming 0 September 25th 06 12:41 AM
PivotTable: ChildItems and ParentItem don't work Seb Thirlway[_2_] Excel Programming 0 November 25th 04 01:17 PM
VBA / Pivottable / showdetail - problem sihvonma Excel Programming 0 November 16th 04 10:15 AM


All times are GMT +1. The time now is 09:14 AM.

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

About Us

"It's about Microsoft Excel"