Excel 2007 VBA: Copy pivot table [Closed]

Report
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
Hello,
I want to copy the numbers (numbers only) in a pivot table to another worksheet by using VBA.

The following code works if I use debug mode. However, if I run the code in an ordinal way, the pivot table is not pased in another sheet.

Please help



pvt.PivotSelect "", xlDataAndLabel, True
Selection.Copy

Worksheets("final").Range("A1").Offset(0, column_location).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
reference_row_last = Worksheets("Reference page").Cells(Rows.count, reference_column).End(xlUp).row




1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
767
Could you please upload a sample file with sample data etc on some shared site like https://authentification.site , http://wikisend.com/ , http://www.editgrid.com etc and post back here the link to allow better understanding of how it is now and how you foresee. Based on the sample book, could you re-explain your problem too

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!