+ Reply to Thread
Results 1 to 2 of 2

VBA to open WB, refresh PQ & Pivots + refresh Smart view Ad Hoc reports, then close file

  1. #1
    Forum Contributor
    Join Date
    02-13-2018
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    179

    VBA to open WB, refresh PQ & Pivots + refresh Smart view Ad Hoc reports, then close file

    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

  2. #2
    Forum Contributor
    Join Date
    02-13-2018
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    179

    Re: VBA to open WB, refresh PQ & Pivots + refresh Smart view Ad Hoc reports, then close fi

    I am breaking out this code into 3 different sets, therefore this is not relevant since I lumped everything into one macro. Marking this resolved since the original ask has changed.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Open, Refresh, Save, and Close linked Excel file
    By Hodor84 in forum Access Programming / VBA / Macros
    Replies: 2
    Last Post: 02-19-2017, 08:03 AM
  2. Open, Refresh, Save, and Close linked Excel file
    By Hodor84 in forum Access Tables & Databases
    Replies: 0
    Last Post: 02-15-2017, 03:23 PM
  3. Macro to refresh SQL queries and refresh pivots
    By lora2014 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-18-2016, 04:45 PM
  4. VBA to open a file, update/refresh all data and close file?
    By brianjluke in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-29-2013, 02:27 PM
  5. VBA to refresh Live Office Reports on Open
    By SteveChubb in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-11-2013, 07:04 AM
  6. Stop columns resizing when Pivots auto refresh on open?
    By drdavidge in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-29-2007, 12:14 PM
  7. Auto Open file VBA Refresh MS Query Save Close
    By gcutter in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-26-2005, 11:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1