98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum 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
Resolved · 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 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
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. |