+ Reply to Thread
Results 1 to 5 of 5

Turn off MS Query auto refresh?

  1. #1
    Registered User
    Join Date
    06-26-2006
    Location
    New York
    MS-Off Ver
    Office Pro 2003 primarily, some 2007
    Posts
    85

    Turn off MS Query auto refresh?

    I have an Excel 2003 workbook that downloads info from our db using MS Query. This workbook is set to refresh when the workbook is opened. Once a month I'd like to save a snapshot of the current data using a batch file and macro. But if I do a Save As of the current workbook, I believe the auto refresh on open will still apply to the new workbook? Can I turn this functionality off using a macro?
    Last edited by dylanemcgregor; 05-26-2010 at 06:56 PM.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,256

    Re: Turn off MS Query auto refresh?

    You can just right-click and change it in the Data Range properties.
    Remember what the dormouse said
    Feed your head

  3. #3
    Registered User
    Join Date
    06-26-2006
    Location
    New York
    MS-Off Ver
    Office Pro 2003 primarily, some 2007
    Posts
    85

    Re: Turn off MS Query auto refresh?

    Thanks. I just did that using the macro recorder and got a bunch of code:

    Please Login or Register  to view this content.
    I'm guessing the .refreshOnFileOpen = False is the only part I care about right?

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,256

    Re: Turn off MS Query auto refresh?

    Correct.

  5. #5
    Registered User
    Join Date
    06-26-2006
    Location
    New York
    MS-Off Ver
    Office Pro 2003 primarily, some 2007
    Posts
    85

    Re: Turn off MS Query auto refresh?

    Awesome! Worked like a charm. Thanks again.

+ 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