Very new to VBA programming. I created a Macro in MS Project 2010 that creates a data file in Excel and then turns it into a Pivot Table. The code executes fine on the initail run but fails to generate the pivot table again unless I close MS Project and rerun.


I suspect the issue has to do with the following line of code

Please Login or Register  to view this content.
where I am referencing 'Sheet1' but I can't figure a way around it to get the same results. I've tried a dozen other methods and none seem to work. Any help would be greatly appreciated. Thanks.


Please Login or Register  to view this content.