Excel 2007 VBA: Copy pivot table

Closed
J - Jun 2, 2010 at 05:41 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jun 2, 2010 at 05:59 PM
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




Related:

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Jun 2, 2010 at 05:59 PM
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
0