+ Reply to Thread
Results 1 to 2 of 2

Pause macro procedure whilst Query runs

  1. #1
    Forum Contributor
    Join Date
    07-07-2005
    Location
    England
    MS-Off Ver
    Office 2019 Enterprise
    Posts
    473

    Pause macro procedure whilst Query runs

    Hi All,

    I have a macro and half way through it executes a Microsoft Query report and then copies the output of that report to another workbook.

    Problem is that before the query has had chance to load (only takes 2 seconds) the copying of the sheet has already been actioned and I am left with a blank sheet.

    I have tried pausing the code using this

    Please Login or Register  to view this content.
    but unfortunately is also pauses the query.

    Can anyone advise pls

    Thanks
    John

  2. #2
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Pause macro procedure whilst Query runs

    you need to use a "doevents"

    You might need to put in two or three


    click on the * Add Reputation if this was useful or entertaining.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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