+ Reply to Thread
Results 1 to 4 of 4

ListBox Selections To Change ReportFilter on PivotTable and then Execute Macro

  1. #1
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366

    ListBox Selections To Change ReportFilter on PivotTable and then Execute Macro

    Hello,

    I have created a ListBox1 that is populated by a PivotTables(1).PivotField(6) (which is a Report Filter called "Select Customer"). I could not figure out how to use PageField to select the Report Filter, so I did a work around.

    Please Login or Register  to view this content.
    I am now attempting to change the Report Filter in the PivotTable to match the selection made in the ListBox1. I then want a macro to execute on that selection. I then want it to repeat the process for each selection made.


    Please Login or Register  to view this content.
    There is probably a much easier way to do this? Can anyone help?

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: ListBox Selections To Change ReportFilter on PivotTable and then Execute Macro

    Is this solved?

    If you solve a problem yourself before anyone else has responded, please take a moment to describe your solution, chances are some other member will benefit.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366

    Re: ListBox Selections To Change ReportFilter on PivotTable and then Execute Macro

    arlu1201,

    I appreciate the top on forum etiquette. I did the task very differently, but it did achieve the result.

    As requested, here is the code that "solved" the thread.

    Please Login or Register  to view this content.
    The CreateUsageReportsFromSelections is a macro that performs the task of copying the page, creating a new Sheet, renaming the new Sheet, formatting the new Sheet; in other words, basic macro.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: ListBox Selections To Change ReportFilter on PivotTable and then Execute Macro

    Thanks for posting the solution.

+ 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] Find multiple selections values in Pivottable.Pagefields using VBA
    By fadydaddy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-12-2014, 04:27 PM
  2. Populating 1 listbox on the basis of another listbox selections
    By protocol in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-22-2011, 07:33 AM
  3. Execute Macro When Cells change
    By scottymelloty in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-28-2010, 11:52 AM
  4. VBA code to change PivotTable selections, based on ActiveX CheckBoxes on a worksheet.
    By BasicElement in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-29-2009, 05:10 AM
  5. On Cell change, execute macro
    By des_wes in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-19-2007, 07:01 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