+ Reply to Thread
Results 1 to 2 of 2

call macro after refresh query end

  1. #1
    Forum Contributor
    Join Date
    07-14-2019
    Location
    Dubai
    MS-Off Ver
    2019
    Posts
    919

    call macro after refresh query end

    Hi

    with open workbook, all queries table will refresh
    how can I add vba code in workbook open, thats say call macro1 after the refresh end

    Thanks

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: call macro after refresh query end

    You do not need VBA to do this. Go to Data > Queries and Connections. Right click on query. In the properties, click OFF Enable Background Refresh. The queries will have to complete before the rest of the code executes.

    I'm not quite sure it this works if you have Refresh Query on Open. If that doesn't work and you have this engaged, click it off and write some On Open code for the workbook that looks like:
    Please Login or Register  to view this content.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

+ 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. Run Macro After SQL Query Refresh
    By Rosco88 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-08-2018, 07:51 AM
  2. [SOLVED] Change Event Call Macro with MS Table Query
    By Redled89 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-16-2016, 11:04 PM
  3. Macro to Refresh Database Query
    By gatorator in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-28-2011, 08:37 AM
  4. Macro to refresh query.
    By CJPHX in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-20-2010, 01:47 PM
  5. Macro to Refresh Import Query
    By erock24 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-02-2009, 03:57 AM
  6. call a Macro when refresh is clicked
    By vvbkumar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-16-2009, 10:04 AM
  7. User-ID & PSWD from Macro for a Query Refresh
    By ldevrries in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-31-2007, 12:21 PM

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