Hi,

I am a complete novice when it comes to macros so please bear with me and forgive my stupidity!

I am trying to record the a simple macro that records data from a filtered pivot table (nominal cost centres) and then copies the selected data into another workbook.

I can record 1 nominal at at time but when I try to simply copy the first macro and change the nominal cost centre then I get runtime '1004' "unable to get pivot table property of worksheets class"

I need the macro to pull both items of data from the pivot and copy it into a new workbook.

Any help would be appreciated.

Macro1

ActiveSheet.PivotTables("PivotTable1").PivotFields("Home Cost Centre"). _
CurrentPage = "12345"
Sheets("Home Cost Centre Analysis").Select
ActiveSheet.PivotTables("PivotTable1").PivotFields("Home Cost Centre"). _
CurrentPage = "12345"
Sheets("Charged Cost Centre Analysis").Select
ActiveSheet.PivotTables("PivotTable1").PivotFields("Cost Centre to Charge"). _
CurrentPage = "12345"
Sheets(Array("Recorded hours by cost centre", "Home Cost Centre Analysis", _
"Charged Cost Centre Analysis")).Select
Sheets("Charged Cost Centre Analysis").Activate
Sheets(Array("Recorded hours by cost centre", "Home Cost Centre Analysis", _
"Charged Cost Centre Analysis")).Copy
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Home Cost Centre Analysis").Select
Cells.Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Charged Cost Centre Analysis").Select
Cells.Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("B26").Select
Application.CutCopyMode = False
Sheets("Recorded hours by cost centre").Select
ActiveWindow.SmallScroll Down:=-24
ActiveWindow.ScrollWorkbookTabs Sheets:=-1
Sheets("Charged Cost Centre Analysis").Select
End Sub
-------------------------------------------------------------------------------------------------------------------------------------------
Macro2

Sheets("Recorded hours by cost centre").Select
ActiveWindow.SmallScroll Down:=-24
ActiveWindow.ScrollWorkbookTabs Sheets:=-1
Sheets("Charged Cost Centre Analysis").Select
ActiveSheet.PivotTables("PivotTable1").PivotFields("Cost Centre to Charge"). _
CurrentPage = "678910"
Sheets("Charged Cost Centre Analysis").Select
Sheets("Charged Cost Centre Analysis").Copy
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("C19").Select
End Sub