The attached Workbook which contains a sheet with two pivot tables. I want to convert the pivot tables into normal tables, so the source data is no longer linked. I'm using this technique manually but want to convert it into a macro:
- Select the pivot table cells and press Ctrl+C to copy the range.
- Use Paste Special to Paste Values.
- Display the Office Clipboard.
- With the unlinked pivot selected, click the item on the Office Clipboard that corresponds to the pivot table copy operation. It will be the last item, unless you copied something else.
I went through the steps and recorded the actions to give me this:
Sub PasteClipboard()
Range("B4:F9").Select
Selection.Copy
Range("B4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
ActiveSheet.Paste
End Sub
However if I then attempt to run the macro on my original pivot tables I get and error (highlighted in red in the code above). Is there anyway to resolve this?
Many thanks
Bookmarks