I have a function which generates pivot tables within Excel from Access. For each sheet with a pivot table I want to select it and paste it over itself. I can find plenty of examples of how to copy using TableRange2, but these all then paste to a new location.
I determine the location of the pivot table by first reading the next empty cell in column 1 after having entered a simple list also based upon an access query, then generate the pivot based on data in another sheet in the same workbook (whihc came from a function in access) and then tweak the format of the pivot a little. Then I want to copy and paste the pivottable to remove the fact it is a pivot so that I can then perform more formating and i also need to replace the field values with an 'x' in the body of the now fake pivot. I thought I could use the previously determined location reference as the paste location, but it is not working. TransExport.bas PivotCode.bas
Getting a 'Unable to get the PageRange property of the pivotTable class' error 1004.