I had a macro that was working fine, I tried to add one table and it broke. I then manually recorded a new macro of all the actions (thinking that would give me the proper code), but the code will still not work.
the rerecorded code is
it refreshes the main pivot table fine.
It pastes the datar in fine.
it will not put the right data in the other tables.
I had just the 3 numberd tabs and it was working fine, I added the "Island" tab and of course did not keep my old stuff and now it will not even do the older tabs.
help
the rerecorded code is
HTML:
'refresh main pivot table
Sheets("Executive").Select
Range("A5").Select
ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh
Cells.Select
Selection.Copy
'paste main table onto other worksheets within the workbook
Sheets("057").Select
ActiveSheet.Paste
Sheets("070").Select
ActiveSheet.Paste
Sheets("133").Select
ActiveSheet.Paste
Sheets("Island").Select
ActiveSheet.Paste
'filter the other worksheets to show just the desired data
Sheets("057").Select
ActiveSheet.PivotTables("PivotTable1").PivotFields
("Campus").CurrentPage = "school 057"
Sheets("070").Select
ActiveSheet.PivotTables("PivotTable2").PivotFields
("Campus").CurrentPage = "school 070"
Sheets("133").Select
ActiveSheet.PivotTables("PivotTable3").PivotFields
("Campus").CurrentPage = "school 133"
Sheets("Island").Select
ActiveSheet.PivotTables("PivotTable4").PivotFields
("Campus").CurrentPage = "school 099"
End Sub
it refreshes the main pivot table fine.
It pastes the datar in fine.
it will not put the right data in the other tables.
HTML:
ActiveSheet.PivotTables("PivotTable1").PivotFields
("Campus").CurrentPage = "school 057"
I had just the 3 numberd tabs and it was working fine, I added the "Island" tab and of course did not keep my old stuff and now it will not even do the older tabs.
help