+ Reply to Thread
Results 1 to 6 of 6

VBA Code for multiple Slicers from different data sets

  1. #1
    Registered User
    Join Date
    10-13-2014
    Location
    Nottingham, England
    MS-Off Ver
    2010
    Posts
    2

    VBA Code for multiple Slicers from different data sets

    Hi,

    Hoping someone can help, never done this before so please bare with me.

    I currently have 4 matching Slicers over 2 seperate pivot tables with 2 data sets. Im very new to writing VBA code and I am hoping someone can help me write a piece of code so when I select a name from SM on pivot table 1, it selects the same name on SM 2.

    My Slicers are called SM, TM, Agent, Call Type & SM 2, TM 2, Agent 2, Call Type 2

    Thanks in advance

  2. #2
    Registered User
    Join Date
    10-13-2014
    Location
    Nottingham, England
    MS-Off Ver
    2010
    Posts
    2

    Re: VBA Code for multiple Slicers from different data sets

    As yet I haven't had a reply and im still really stuck, can anyone help me please????

  3. #3
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: VBA Code for multiple Slicers from different data sets

    Here's a fairly basic example. The code needs to go behind the sheet with the pivot table controlled by SM slicer on it (right-click the worksheet tab, choose View Code and paste this in):
    Please Login or Register  to view this content.
    Note: you will probably need to adjust the Slicer and pivot table names to match your actual workbook.
    Remember what the dormouse said
    Feed your head

  4. #4
    Registered User
    Join Date
    11-13-2014
    Location
    Poland
    MS-Off Ver
    2010
    Posts
    3

    Re: VBA Code for multiple Slicers from different data sets

    Doesn't work...

  5. #5
    Registered User
    Join Date
    07-01-2015
    Location
    Washington, DC
    MS-Off Ver
    Office 2013
    Posts
    5

    Re: VBA Code for multiple Slicers from different data sets

    Hi Rompstomper, i'm getting an:
    "Application-define or object-defined error"

    When attempting to sync across slicers. SlicerA's Report Connections are to several Pivot Tables and it's data source is in PowerPivot. SlicerB's report connection is to an Excel Table (which is obviously also it's data source).....

    Anything you can do to help? Unfortunately, I can't post a sample workbooks as creating a dummy book would take forever because of the structure.

  6. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,572

    Re: VBA Code for multiple Slicers from different data sets

    Polak,
    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    Ben Van Johnson

+ 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. Synchronize Slicers with multiple data sources
    By dkjhn in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-22-2015, 02:56 PM
  2. [SOLVED] Combining multiple Worksheet_Change sets of code into one
    By haljam in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-07-2014, 01:56 AM
  3. [SOLVED] Data Thinner code seems very inefficient- used on large data sets
    By Canuckle777 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-25-2013, 10:29 AM
  4. [SOLVED] Pivot Slicers from multiple Caches - problem with 2nd Slicer displaying incorrect data
    By matt4003 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-14-2013, 03:06 AM
  5. Multiple charts over multiple sets of data over multiple worksheets.
    By matrocka in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-12-2007, 10:01 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