Access Beginner
Active Member
- Joined
- Nov 8, 2010
- Messages
- 311
- Office Version
- 2016
- Platform
- Windows
Hi All,
I have the following code that severs the data connection to a couple of pivot tables on a couple of sheets. Is there a way to make the below code more compact/efficient?
Using Excel 2013
Cheers
Haydn
I have the following code that severs the data connection to a couple of pivot tables on a couple of sheets. Is there a way to make the below code more compact/efficient?
Code:
Sheets("DebtSummaryIII").Select
ActiveSheet.PivotTables("PivotTable2").SaveData = False
ActiveWorkbook.ShowPivotTableFieldList = False
Sheets("DebtSummaryII").Select
ActiveSheet.PivotTables("PivotTable1").SaveData = False
ActiveWorkbook.ShowPivotTableFieldList = False
Sheets("DebtSummaryII").Select
ActiveSheet.PivotTables("PivotTable2").SaveData = False
ActiveWorkbook.ShowPivotTableFieldList = False
Sheets("DebtPivotTable").Select
ActiveSheet.PivotTables("DebtPivotTable").SaveData = False
ActiveWorkbook.ShowPivotTableFieldList = False
Sheets("DebtPivotTable").Select
ActiveSheet.PivotTables("PivotTable1").SaveData = False
ActiveWorkbook.ShowPivotTableFieldList = False
Using Excel 2013
Cheers
Haydn