+ Reply to Thread
Results 1 to 11 of 11

Help adjusting macro to copy all pivot tables on a page, versus just active table

  1. #1
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Help adjusting macro to copy all pivot tables on a page, versus just active table

    I have a pivot table on A1, E1, I1, M1. How do I make this copy all those on the same sheet.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Help adjusting macro to copy all pivot tables on a page, versus just active table

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Help adjusting macro to copy all pivot tables on a page, versus just active table

    Thanks, but that still only copied the pivot table in A1 though

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Help adjusting macro to copy all pivot tables on a page, versus just active table

    If you want to copy them to the same place on another sheet, you need a small change
    Please Login or Register  to view this content.
    I've highlighted the few changes I made to AlphaFrog's code.
    Last edited by xlnitwit; 10-23-2017 at 09:08 AM.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  5. #5
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Help adjusting macro to copy all pivot tables on a page, versus just active table

    Thanks. That copies pivot table3 but then an error pops up saying Could Not Copy Pivot Table.

  6. #6
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Help adjusting macro to copy all pivot tables on a page, versus just active table

    Comment out the line that says
    Please Login or Register  to view this content.
    and then run the code again and see what the error message is, and on which line it happens.

  7. #7
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Help adjusting macro to copy all pivot tables on a page, versus just active table

    Object doesn't support this property or method
    highlights:
    Please Login or Register  to view this content.

  8. #8
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Help adjusting macro to copy all pivot tables on a page, versus just active table

    On which line? I've run that exact code in 2010 on a sheet with multiple pivot tables, so I am a little surprised.

  9. #9
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Help adjusting macro to copy all pivot tables on a page, versus just active table

    Does this answer?

    Please Login or Register  to view this content.

  10. #10
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Help adjusting macro to copy all pivot tables on a page, versus just active table

    Apologies, that is a typo- it should read
    Please Login or Register  to view this content.
    and not
    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Help adjusting macro to copy all pivot tables on a page, versus just active table

    Dammmmnnn. That works beautifully. Thanks!!

    Now I just have to figure out how to set the date filter automatically and limit my Top 3 results to actually only 3 results.

+ 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. Adjusting Pivot Table to Generate grpah then copy and paste graph into PowerPoint
    By flutergirl in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-18-2014, 11:36 PM
  2. Auto-adjusting Pivot Tables
    By twalker1228 in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 03-05-2013, 09:59 AM
  3. [SOLVED] 3,000 Tables versus 3,000 Worksheets versus 3,000 Workbooks
    By StevenM in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-18-2012, 03:15 AM
  4. Macro that will copy cells to another area & print active page (not sheet)
    By Cyali in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-10-2012, 09:34 PM
  5. Adding formula to active table and for pivot table in macro
    By Jerseynjphillypa in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-08-2012, 08:12 AM
  6. Replies: 1
    Last Post: 04-12-2010, 01:01 PM
  7. Macro menu item versus keyboard shortcut on pivot table
    By TrevorM in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-21-2006, 06:50 AM

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