combobox used refresh multiple

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

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

ComboBox Used to Refresh Multiple PivotTables | Excel forum

resolvedResolved · Medium Priority · Version 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:

Page Break Preview in Excel 2010 (Hint/tip)

If you select View then Workbook Views then Page Break Preview, you will be able to view how your Excel spreadsheet will be split across multiple pages when printed. Even better, you can also drag a page break to a new place. Excel will then scale down your entire worksheet to fit the information you want on the pages you want.

View all Excel hints and tips


Server loaded in 0.08 secs.