PDA

View Full Version : vba copying and paste pivot tables fields



yuechu
09-04-2015, 10:35 AM
Hello,


I have a difficult vba question that I need to try and solve and it's kind of specific.
Background:
I have two files. Both source file and target file have multiple tabs with multiple pivot tables on them.
task:
locate all the pivot tables in the source file
for each pivot table I need to extract the row field, column field, data field, filtering and then paste this "pivot table property" into the same pivot table (with same tab name) in the target file. I do not want to copy the entire pivot table because I have charts and formulas running off the target pivot table.


so how easy and possible is it to copy "pivot table properties" to another file and how would a person go about doing it. I am a novice when it comes to vba programming with pivot tables.


thanks,
yue

mancubus
09-05-2015, 03:07 PM
you need some tutorial then...

http://www.globaliconnect.com/excel/index.php?option=com_content&view=article&id=158:excel-pivot-table-properties-a-settings-using-vba&catid=79&Itemid=475

http://peltiertech.com/Excel/Charts/ChartIndex.html#P

http://www.excelforum.com/excel-programming-vba-macros/822434-accessing-properties-of-a-pivot-table.html
you need to be a member to view the codes and files...