Hello,
i am a very new VBA writer in Excel. any help is greatly appreciated.
what i am trying to do is copy an entire pivot table from one workbook, and paste it into another. this is a subset of the entire macro i am trying to execute, but i compartmentalised it to break out this error: "Subscript out of range". i dont know what this means since i am unhiding all the rows that the pivot table is occupying. i have opened all of the workbooks in the code prior to running this set of code. i wrote most of this based on the Record Macro function in Excel 2010
Please HELP!
this is the code:
Sub CopySummaryPivot()
'need to copy the summary pivot & paste into FY12 Q4 Data > 'Pivot' $A$1
Workbooks("CurrentFinRep.xls").Activate
Sheets("Summary").Activate
Rows("11:13").Select
Selection.EntireRowHidden = False
ActiveSheet.PivotTables("FCST_PivotSummary").PivotSelect "", xlDataAndLabel, _
True
Application.CutCopyMode = False
Selection.Copy
Workbooks("FY12 Q4 Data.xlsm").Activate
Sheets("Pivot").Activate
Range("$A$1").Activate
ActiveSheet.Paste
End Sub
Bookmarks