+ Reply to Thread
Results 1 to 2 of 2

VBA code to Expand all rows in a pivot table

  1. #1
    Registered User
    Join Date
    10-16-2018
    Location
    Cumming, GA
    MS-Off Ver
    2016
    Posts
    9

    VBA code to Expand all rows in a pivot table

    I want to add a control button on my worksheet that has a pivot table that will expand all rows. I keep getting this error message: Run-time error '1004'; Application-defined or object-defined error. Can anyone help me understand what I need to do to fix this error? Thanks


    HTML Code: 

  2. #2
    Registered User
    Join Date
    10-16-2018
    Location
    Cumming, GA
    MS-Off Ver
    2016
    Posts
    9

    Re: VBA code to Expand all rows in a pivot table

    I forgot to mention that the error is pointing to the 'rf.ShowDetail = True' line.
    Last edited by mbond007; 10-26-2018 at 09:24 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. [SOLVED] Adapting VBA code to alow use of expand/collapse field on a pivot table
    By michelle 1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-06-2015, 07:37 AM
  2. [SOLVED] Pivot table-remove expand and close from pivot layout
    By excelmr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-01-2015, 07:00 PM
  3. VBA for Pivot Table (Expand All)
    By Keibri in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-28-2015, 06:51 AM
  4. Use slicer to expand / collapse pivot table
    By IronCladRooster in forum Excel General
    Replies: 1
    Last Post: 02-24-2015, 10:54 AM
  5. Expand a table by adding rows ( table feature 2007 and later)
    By Pepe Le Mokko in forum Excel General
    Replies: 3
    Last Post: 08-13-2013, 05:12 AM
  6. VBA To Expand Pivot Table and Copy Pivot Items
    By kidengineer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-06-2013, 12:50 AM
  7. 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

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