balaji3081
Member
Hi,
I have recorded a macro to save the data source in the background of three pivot tables, The macro is too specific to the three pivot I have, is there a way that it works on any pivot
I have recorded a macro to save the data source in the background of three pivot tables, The macro is too specific to the three pivot I have, is there a way that it works on any pivot
Code:
Sub Pivot()
'
' Pivot Macro
' save data source
'
' Keyboard Shortcut: Ctrl+e
'
ActiveSheet.PivotTables("PivotTable6").SaveData = True
ActiveSheet.Next.Select
ActiveSheet.PivotTables("PivotTable1").SaveData = True
Sheets("Project Driven Expenses").Select
ActiveSheet.PivotTables("PivotTable2").SaveData = True
Selection.End(xlToLeft).Select
Selection.End(xlToLeft).Select
Selection.End(xlToLeft).Select
Selection.End(xlUp).Select
ActiveSheet.Previous.Select
ActiveSheet.Previous.Select
End Sub