Pivot Table Report Filter matching

Mikeykt

New Member
Joined
Feb 10, 2011
Messages
47
Hi

I'm trying to connect my Pivot table report filter to a corresponding combo box on a front page.

There are five boxes and report filters with matching names, I've tried the following code but I keep getting 'Object doesn't support this property'

Can anyome help?

Sub pivotchoice()
'
' pivotchoice Macro
'
Worksheets("GIFTS").Select
ActiveSheet.PivotTables("Gifts").PivotFields("Campaign").CurrentPage = Worksheets("FrontSheet").CampaignNameGCombo.Value
ActiveSheet.PivotTables("Gifts").PivotFields("Campaign_Code").CurrentPage = Worksheets("FrontSheet").CampaignNumGCombo.Value
ActiveSheet.PivotTables("Gifts").PivotFields("Campaign_Year").CurrentPage = Worksheets("FrontSheet").CampaignYearGCombo.Value
ActiveSheet.PivotTables("Gifts").PivotFields("Can_Mail").CurrentPage = Worksheets("FrontSheet").CanMailGCombo.Value
ActiveSheet.PivotTables("Gifts").PivotFields("Can_Phone").CurrentPage = Worksheets("FrontSheet").CanPhoneGCombo.Value
End Sub
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
What code do you get if you record a macro while changing the current page in the Campaign pivot field? Are your ComboBoxes from the Control Toolbox?
 
Upvote 0
Hi

Yes I created the Campaign combo box from the control field, should I create it using VBA instead?
 
Upvote 0
Hi

Ok this is the one for the Campaign Name

Sub CampaignNameG_Change()
'
' CampaignNameG_Change Macro
'
'
Sheets("GIFTS").Select
ActiveSheet.PivotTables("GIFTS").PivotFields("CAMPAIGN").ClearAllFilters
ActiveSheet.PivotTables("GIFTS").PivotFields("CAMPAIGN").CurrentPage = "(All)"
End Sub

Thanks
 
Upvote 0
So it's from the Forms Toolbar. You won't be able to use its Value property because that returns an index. This worked for me:

Code:
Sub Test()
    With Worksheets("FrontSheet").DropDowns("CampaignNameGCombo")
        MsgBox .List(.ListIndex)
    End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,570
Messages
6,179,610
Members
452,931
Latest member
The Monk

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