Reputation: 19
I have a Power Query that produces two pivot tables named with the default names PivotTable1 and PivotTable2. Each pivot is in its own sheet (e.g., "sheet1" and "sheet2"). When any of the underlying data changes (which is essentially reading multiple excel files from a folder), I can manually refresh. But when I try doing this with visual basic code, I cannot do it. I have looked at different examples (e.g., VBA Excel - Refresh Pivot Table/Power Query) and several others, but nothing seems to work. I have uncheck the 'enable background refresh' option of the connections properties. Any help is appreciated, but please specify where I should reference my sheets (e.g., "sheet1" and "sheet2" above) or pivots if at all needed.
Upvotes: 1
Views: 152