Pivot Table Help Please

markdenovan

Board Regular
Joined
Dec 15, 2002
Messages
97
We have an Excel sheet with a number of different pivot tables on it.

They look at the same data, and there are fields Month & Date

We have simple macro where you set the Month on the first pivot table and it copies the value to the other pivot tables.

ActiveSheet.PivotTables("PivotTable2").PivotFields("Month").CurrentPage = Cells(2, 2).Text

This works fine in Office 2000, but we have just installed Office 2007 and it won't work anymore?

Wierldy, it works on a couple by changing the end to .Value but on one field it jusy refuses to work.

I have checked and the value is def available.

Any ideas?

Many thanks,

Mark
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Does this work?

Code:
ActiveSheet.PivotTables("PivotTable2").PivotFields("Month").CurrentPage = ActiveSheet.PivotTables("PivotTable1").PivotFields("Month").CurrentPage

or:

Code:
Dim x as String
x = ActiveSheet.PivotTables("PivotTable1").PivotFields("Month").CurrentPage
ActiveSheet.PivotTables("PivotTable2").PivotFields("Month").CurrentPage = x
 
Upvote 0
Hi Andrew,

Many thanks for trying, but sadly no, the vba still falls over.

It is so strange as it works in Excel 2000 fine.

Any other ideas?

Many thanks,

Mark
 
Upvote 0
Is the field it fails on a date field?
 
Upvote 0

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top