Hi,
I am trying to use VBA to do the following functions:
1. Open a excel WB in a folder on a loop
2. refresh the SmartView Ad Hoc report data
3. Refresh the data connections/Power Query
4. Refresh pivot tables
5. then close the workbook.
The folder contains 12 workbooks. I want the code to loop through all excel files in the folder and perform the actions listed above.
Below is code I am using but it is not working. Any help or advice is appreciated! Thanks
code.PNG
Bookmarks