Good morning,
I have a combo box built to control pivot table filters. It's working fine unless one of my combo box selections doesn't have data in the pivot being controlled. I'll either get an error message requesting END or Debug or it keeps the same data from the previous selection. I've added the code below. Do i need to include some type of clear statement if there is no match between the combo box selection and pivots?
The combo box works perfect for me unless there isn't a match with the pivot filters, etc. A copy of my code is below
Any assistance will be greatly appreciated. I'm still somewhat new with this type of function.
Thanks in advance.
Scott
Mod Edit: code tags added
I have a combo box built to control pivot table filters. It's working fine unless one of my combo box selections doesn't have data in the pivot being controlled. I'll either get an error message requesting END or Debug or it keeps the same data from the previous selection. I've added the code below. Do i need to include some type of clear statement if there is no match between the combo box selection and pivots?
The combo box works perfect for me unless there isn't a match with the pivot filters, etc. A copy of my code is below
Any assistance will be greatly appreciated. I'm still somewhat new with this type of function.
Thanks in advance.
Scott
Code:
Sub Sponsor_Name()
'
' SponsorNAME
'
'
Application.ScreenUpdating = False
Sheets("Data Sources").Visible = True
Application.ScreenUpdating = False
Sheets("Data Sources").Select
ActiveSheet.PivotTables("PVT2").PivotFields("SponsorName").CurrentPage = _
Range("A2").Text
ActiveSheet.PivotTables("PVT5").PivotFields("SponsorName").CurrentPage = _
Range("A2").Text
ActiveSheet.PivotTables("PVT7").PivotFields("Client Name").CurrentPage = _
Range("A2").Text
Sheets("Data Sources").Visible = False
Application.ScreenUpdating = False
Sheets("Dashboard Summary").Select
Mod Edit: code tags added
Last edited by a moderator: