Excel 2007 VBA: Copy pivot table

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