+ Reply to Thread
Results 1 to 3 of 3

Pivot T Problem w/Expand-Collapse all PTs

  1. #1
    Registered User
    Join Date
    03-18-2010
    Location
    Layton, UT
    MS-Off Ver
    Excel 2013
    Posts
    73

    Pivot T Problem w/Expand-Collapse all PTs

    I have some code in my workbook that I'm trying to get to expand and collapse all 3 pivot tables (#2,7,9) while worksheet is protected.
    But it only expands the first pivot table and gives me a error code 400. I need the code it to expand and collapse all three PT, when the worksheet is protected. Thanks for your help.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Pivot T Problem w/Expand-Collapse all PTs

    hi catnam,

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-18-2010
    Location
    Layton, UT
    MS-Off Ver
    Excel 2013
    Posts
    73

    Thumbs up Re: Pivot T Problem w/Expand-Collapse all PTs

    Sha Zam! This works great! I also needed to collapse all PT, so all I had to do was change .ShowDetail=1 to .ShowDetail=0. I really appreciate your help. For those with similar issue, also see my 10/20/14 post ( Pivot Table Problem with OFFSET for Dynamic Source).
    Attached Files Attached Files
    Last edited by catnam; 10-22-2014 at 09:00 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. VBA to expand & collapse multiple pivot tables at the same time
    By jrg72982 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-29-2014, 06:12 PM
  2. VBA IF statement tied to expand/collapse pivot items
    By Platinum3x in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-26-2013, 11:41 AM
  3. Expand & Collapse Pivot Tables in multiple worksheets
    By kaseyleigh in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 12-12-2012, 09:57 AM
  4. Collapse/Expand - Pivot table Fields - Need equivalent option in Excel VBA Pivot table
    By ragavendraph in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-07-2012, 03:00 PM
  5. macro to expand and collapse a pivot field failing.
    By dcgrove in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-01-2010, 02:30 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1