Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 217
Default VBA Pivot Table Change Criteria - Help?!

I have a worksheet called Front where there is a field populated with a date
in dd/mm/yyy format (in cell B10).
On this worksheet I have a button which runs the below code and should look
at a worksheet called Pivots which contains 10 pivot tables. I need the code
to change the Page value of each of these pivots to the date populated in
cell B10 on the Front worksheet.
The source data and the pivot has the date in the same format as each other
and the Pivots are named PivotTable6 etc etc...

Sheets("Pivots").Select
ActiveSheet.PivotTables("PivotTable6").PivotFields ("Invoice
Month").CurrentPage = ActiveSheet.Range("B10").Value

When I run this code it give me an error advising:

Unable to set the _Default property of the Pivot Item class

Any ideas appreciated as his is driving me crazy!

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,180
Default VBA Pivot Table Change Criteria - Help?!

Excel 2007 PivotTable
Filter multiple PT page fields.
Select criteria from Table drop-downs.
http://c0718892.cdn.cloudfiles.racks.../04_22_10.xlsm
Pdf preview:
http://www.mediafire.com/file/kn51u0iznmy/04_22_10.pdf

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot Table criteria Mouimet Excel Discussion (Misc queries) 2 November 18th 09 01:52 PM
change/set pivot table autofilter criteria with macro button jackie Excel Discussion (Misc queries) 3 March 16th 09 02:03 AM
Change of table name in access where Excel obtains pivot table inf Andrew Excel Programming 3 July 26th 07 03:06 AM
how to i pivot a table using various criteria Emmal Excel Worksheet Functions 0 May 4th 06 12:01 AM
criteria for Pivot Table xenophon Excel Discussion (Misc queries) 5 November 15th 05 10:17 AM


All times are GMT +1. The time now is 04:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"