I got a couple of macros that works fine and now I wana mix them in only one.
Macro 1 opens all books in a directory and update every Pivot table.
Macro 2 does something similar, but it works with PowerPivot. It refresh the powerpivot data and after that it refresh the Pivot Tables in active Excel book.
Now I need you to mix both macros in one single one:
1 - We will place both macro in a new workbook, and it will run when workbook open. First you must confirm if the PowerPivot complement is active, if it is not, then active it (I do not have the code to active the complement).
2 - read a directory and open the xls files (I got this code in the first macro)
3 - for each workbook:
- if it has a PowerPivot source, then run the code in macro 2
- if not, then run the macro 1, this is refresh every pivot table in active workbook (this code is working fine now)
4 - save, close and open next (this code is in macro 1)
Both macros works fine separatedly, and combined they should not have any problem.
I can do some test, but I prefer you to have PowerPivot in your side to do some test before I received the first version...
5 freelancers are bidding on average $54 for this job
Hi, I am a computer science graduate and have enough skills in VBA for Excel, Access and Word. I am very interested in your project. I can develop this within a day.