+ Reply to Thread
Results 1 to 7 of 7

Disconnect slicers, dynamically update pivot table data source range et reconnect

  1. #1
    Registered User
    Join Date
    05-11-2016
    Location
    OTA
    MS-Off Ver
    2010
    Posts
    10

    Disconnect slicers, dynamically update pivot table data source range et reconnect

    Hey everyone, I'm a noob trying to learn. I built a dashboard with charts and slicers made from pivot tables. I would love to be able to update the data source range automatically (which requires disconnecting all slicers, updating and then reconnecting everything) using VBA.

    I found this piece of code but I don't really know how to use it...

    Can you help me please?

    Thank you very much,

    vincent

    Please Login or Register  to view this content.

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,908

    Re: Disconnect slicers, dynamically update pivot table data source range et reconnect

    It looks like the only thing you need to change is this line:
    Please Login or Register  to view this content.
    to match the names of the slicers you need to disconnect.

  3. #3
    Registered User
    Join Date
    05-11-2016
    Location
    OTA
    MS-Off Ver
    2010
    Posts
    10

    Re: Disconnect slicers, dynamically update pivot table data source range et reconnect

    Thanks

    There seems to be other parameters I need to change like "eLink_Raw" in
    Please Login or Register  to view this content.
    Also I can't figure out what "Slicer_" mean in this line of code:
    Please Login or Register  to view this content.
    Thanks for your help!

  4. #4
    Registered User
    Join Date
    05-11-2016
    Location
    OTA
    MS-Off Ver
    2010
    Posts
    10

    Re: Disconnect slicers, dynamically update pivot table data source range et reconnect

    the error comes at
    Please Login or Register  to view this content.
    Last edited by Vincent121; 06-08-2016 at 09:11 AM.

  5. #5
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,908

    Re: Disconnect slicers, dynamically update pivot table data source range et reconnect

    By default the slicer cache is called Slicer_ followed by the name of the field you attached the slicer to. What did you alter the array to?

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

    Re: Disconnect slicers, dynamically update pivot table data source range et reconnect

    thanks, I added my slicers.. for some reason the "Slicer_" seems to cause errors in my code

  7. #7
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,908

    Re: Disconnect slicers, dynamically update pivot table data source range et reconnect

    What does:
    Please Login or Register  to view this content.
    show?

+ 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. Can I update data source from pivot table?
    By elbrujo in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-02-2016, 10:25 PM
  2. [SOLVED] Disconnect Slicers, Change Pivot Table Source, Reconnect Slicers: a problem
    By Geoff. in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-30-2015, 02:27 PM
  3. using VBA to update a pivot table data source
    By bzl in forum Excel General
    Replies: 1
    Last Post: 06-03-2015, 04:38 PM
  4. change(update) pivot table data source.
    By Berserk in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-09-2012, 08:21 AM
  5. Update source data from pivot table
    By bryanbak3 in forum Excel General
    Replies: 0
    Last Post: 01-12-2012, 05:28 PM
  6. Update Pivot table using a dynamic range for source data
    By Carl Thompson in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-02-2011, 08:20 AM
  7. DYNAMICALLY data source for pivot table
    By Kalyan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-12-2006, 11:10 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