Hi there

I'm trying to create the code which will enable my pivot to clear all filters and then select only last month e,g "Aug-2015" (It always needs to select the previous month at the point of using the worksheet only.)

I managed to achieve this for other pivot types (where only one filter option is available, rather than multiple filters at one time) by using:


Sheets("SHEET NAME").Select
ActiveSheet.PivotTables("PivotTable1").PivotFields("Month Opened"). _
CurrentPage = Choose(Month(Now()), "Dec-2015", "Jan", "Feb", "March", "April", "May", "June", "July", "Aug-2015", "Sep-2015", "Oct-2015", "Nov-2015")

This effectively selects the current month minus one month and seems to work. I’ll need to change to 2016 at some point though obviously.

I am completely new to any sort of VBA so just hashed it out really.

Anyway, this code doesn’t work on pivots where you can select multiple dates/filters, for example 1 years worth of data split per month. I'm only interested in the pivot displaying last months data, nothing historic.

I hope that makes sense, as I say - I'm new to this so go easy on me

Any help appreciated.

Thanks

Brian