+ Reply to Thread
Results 1 to 13 of 13

Updating multiple pivot tables on one worksheet only

  1. #1
    Registered User
    Join Date
    11-17-2016
    Location
    UK
    MS-Off Ver
    2010
    Posts
    6

    Updating multiple pivot tables on one worksheet only

    Hi I have the following VBA code which works across every worksheet in my workbook, however I only want it to work on one specific worksheet and don't know how to amend it. Any help greatly appreciated.

    Please Login or Register  to view this content.
    Last edited by Simpson67; 11-17-2016 at 09:37 AM. Reason: RULES

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Amending VBA

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Amending VBA

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  4. #4
    Registered User
    Join Date
    11-17-2016
    Location
    UK
    MS-Off Ver
    2010
    Posts
    6

    Re: Amending VBA

    Sorry about that - hopefully I've fixed it now according to the rules.

  5. #5
    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: Updating multiple pivot tables on one worksheet only

    Perhaps this
    Please Login or Register  to view this content.
    which will- hopefully, anyway, as I have done this freehand- update all pivot tables on the same sheet.
    Last edited by xlnitwit; 11-17-2016 at 09:43 AM.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  6. #6
    Registered User
    Join Date
    11-17-2016
    Location
    UK
    MS-Off Ver
    2010
    Posts
    6

    Re: Updating multiple pivot tables on one worksheet only

    Hi, thank you for your help. I should have stated that I have several Pivot Tables on the one worksheet so this is only updating one of them?

  7. #7
    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: Updating multiple pivot tables on one worksheet only

    This should update all the pivot tables on the same sheet as the one you are changing.

  8. #8
    Registered User
    Join Date
    11-17-2016
    Location
    UK
    MS-Off Ver
    2010
    Posts
    6

    Re: Updating multiple pivot tables on one worksheet only

    It must be me .... I have 4 pivot tables, each with report filters. I select a report filter on the drop down on the first pivot and the selection I make appears on the 2nd pivot table only?

  9. #9
    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: Updating multiple pivot tables on one worksheet only

    Can you post a workbook so that I might test? I had to make the adjustments freehand so it is possible I overlooked something though the code appears correct to me.

  10. #10
    Registered User
    Join Date
    11-17-2016
    Location
    UK
    MS-Off Ver
    2010
    Posts
    6

    Re: Updating multiple pivot tables on one worksheet only

    Here is the original file I downloaded to get the code from.
    Attached Files Attached Files

  11. #11
    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: Updating multiple pivot tables on one worksheet only

    Aha. The Is operator is the culprit- which I should really have anticipated for an object passed ByVal. Please amend this line
    Please Login or Register  to view this content.
    thus
    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    11-17-2016
    Location
    UK
    MS-Off Ver
    2010
    Posts
    6

    Re: Updating multiple pivot tables on one worksheet only

    Thank you so much, this is now working

  13. #13
    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: Updating multiple pivot tables on one worksheet only

    You're welcome.

+ 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. Amending data
    By rode40 in forum Excel General
    Replies: 1
    Last Post: 01-15-2013, 05:11 PM
  2. [SOLVED] Amending a Key formula
    By pauldaddyadams in forum Excel General
    Replies: 18
    Last Post: 10-06-2012, 04:37 PM
  3. Amending One Field from Another
    By cgolds in forum Excel General
    Replies: 3
    Last Post: 04-17-2012, 11:59 AM
  4. Help with VBA amending
    By sideshow1987 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-26-2011, 07:32 AM
  5. Amending Sub totals
    By AK262007 in forum Excel General
    Replies: 1
    Last Post: 05-01-2009, 10:40 AM
  6. Amending an if statement
    By isolation123 in forum Excel General
    Replies: 27
    Last Post: 03-13-2008, 08:02 AM
  7. Amending code
    By khalid79m in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-26-2007, 03:23 PM
  8. Help with Amending this Code Please
    By [email protected] in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-01-2005, 03:06 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