Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

combobox used refresh multiple

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » ComboBox Used to Refresh Multiple PivotTables

ComboBox Used to Refresh Multiple PivotTables

ResolvedVersion 2007

Mark has attended:
Excel VBA Intro Intermediate course
Excel Advanced - For Power Users course
Excel PowerPivot course
Excel Dashboards for Business Intelligence course

ComboBox Used to Refresh Multiple PivotTables

I have a sheet with 6 pivot tables on, what I'm trying to do is to insert an ActiveX ComboBox where the user will make their selection and it'll then update all of the Pivots. I understand I also need an update button for it to calculate the refresh of the Pivots but I'm struggling with the code which picks up changes to the works. I've set the ComboBox linked cell to C3 to pick up the value entered in the ComboBox;

Private Sub Worksheet_Change()

If Target.Address = Range("C3").Address Then

Me.PivotTables("PivotTable2").PivotFields("MA_Name").CurrentPage = Range("C3").Value
Me.PivotTables("PivotTable3").PivotFields("MA_Name").CurrentPage = Range("C3").Value
Me.PivotTables("PivotTable7").PivotFields("MA_Name").CurrentPage = Range("C3").Value
Me.PivotTables("PivotTable6").PivotFields("MA_Name").CurrentPage = Range("C3").Value
Me.PivotTables("PivotTable12").PivotFields("MA_Name").CurrentPage = Range("C3").Value
Me.PivotTables("PivotTable11").PivotFields("MA_Name").CurrentPage = Range("C3").Value

End If

End Sub

When I make the change in the ComboBox it debugs with Error 424 Object Required and then highlights the code line If Target.Address = Range("C3").Address Then

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Quickly Adding New Worksheets

Want to place a new Excel worksheet before current worksheet. Use keystroke SHIFT+F11

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.13 secs.