Hello,
I have a pivot table with 4 columns which I want to select the whole range and copy to another worksheet in (A2:D2 till the end of the row of the pivot table).
I have this code.
Dim rng As Range
Set rng = ActiveSheet.PivotTables("Draaitabel1").DataBodyRange
Set rng = rng.Resize(RowSize:=rng.Rows.Count - 1)
rng.Select
Which only selects the last column of the pivot table but excludes the last row. How can I copy all of the columns and copy them to a certain destination?
I have a pivot table with 4 columns which I want to select the whole range and copy to another worksheet in (A2:D2 till the end of the row of the pivot table).
I have this code.
Dim rng As Range
Set rng = ActiveSheet.PivotTables("Draaitabel1").DataBodyRange
Set rng = rng.Resize(RowSize:=rng.Rows.Count - 1)
rng.Select
Which only selects the last column of the pivot table but excludes the last row. How can I copy all of the columns and copy them to a certain destination?