+ Reply to Thread
Results 1 to 4 of 4

refresh queries after a certain time

  1. #1
    Registered User
    Join Date
    01-24-2023
    Location
    fdasfdsa
    MS-Off Ver
    2012
    Posts
    1

    Exclamation refresh queries after a certain time

    I tried to use the following macro to refresh queries as the following:

    refresh query 1 after 1 minutes
    refresh query 2 after 2 minutes
    refresh query 3 after 3 minutes
    refresh query 4 after 4 minutes
    refresh query 5 after 5 minutes


    I got error in this line:
    ThisWorkbook.Queries("q1").Refresh

    please help




    Please Login or Register  to view this content.
    Crossposted here: https://www.mrexcel.com/board/thread...-time.1227990/
    Last edited by Glenn Kennedy; 01-25-2023 at 05:31 AM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: refresh queries after a certain time

    Two rule violations!!

    Welcome (back) to the forum.

    Thanks for your question. However, we have just found out that you have posted the same question elsewhere.... and haven't told us. Feel free to cross-post on other sites...

    But. Every forum has its rules. Please see Forum Rule #3 about cross-posting. So.

    Do not keep it a secret. We all are willing to give you our time, freely. However, some of us get very annoyed if we waste our time developing a solution for you, when you already have a nice solution elsewhere. All we ask is that you show us some respect and tell us:

    1) if you have cross-posted, and

    2) the URL of the cross posts.

    That way, those of us who don't want to waste their time can quickly check to see if you're already happy with another solution.


    However, since you are either a new member or a very infrequent user, on this occasion, I have done it for you. Is it cross-posted anywhere else?
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: refresh queries after a certain time

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    Again... since you're new here, I've done it for you... this time.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,888

    Re: refresh queries after a certain time

    Open the Query Properties and set the time to refresh.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. [SOLVED] Refresh queries in other workbooks
    By JyothiGrace in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-09-2022, 01:09 PM
  2. Power Query - How to refresh queries?
    By ypurcaro in forum Excel General
    Replies: 11
    Last Post: 02-11-2019, 06:47 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. [SOLVED] Refresh Specific Web Queries
    By dhd2005 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-08-2015, 12:38 PM
  5. How can I refresh all the Queries on a Worksheet?
    By hammerhead13 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-24-2008, 01:07 PM
  6. Replies: 0
    Last Post: 07-25-2006, 11:30 AM
  7. [SOLVED] Refresh queries, graphs, and charts
    By Dale Fye in forum Excel General
    Replies: 1
    Last Post: 04-01-2005, 04:06 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