+ Reply to Thread
Results 1 to 3 of 3

Macro to run multiple query

  1. #1
    Registered User
    Join Date
    05-13-2016
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2

    Macro to run multiple query

    Hi guys!
    I have 10 sheets in an Excel workbook.
    The data on these sheets are imported from ODBC through 10 different Microsoft queries.
    Now the 10 queries share a same parameter, the time period, such as <#2016/3/31#.
    Every time I want to run these queries, I need to open each one and modify the period parameter.
    Is there a way to input the time period parameter in an cell or record a macro so that I can simply click a button to have all the queries use this parameter?

    thanks for your help :)

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Macro to run multiple query

    Did you try recording a macro to see if that got you started?

    There is absolutely a way to have them all modified to the same parameter.

    http://www.mrexcel.com/forum/excel-q...lications.html
    https://social.msdn.microsoft.com/Fo...forum=exceldev
    http://stackoverflow.com/questions/3...nt-be-displaye

    Google is your friend.
    Last edited by mikeTRON; 05-13-2016 at 01:09 PM.
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Registered User
    Join Date
    05-13-2016
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2

    Re: Macro to run multiple query

    Thanks so much.
    You are right.
    I should've google it in the begining.
    There are many different ways to achieve this outcome.

+ 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. Replies: 1
    Last Post: 11-14-2015, 07:34 PM
  2. Replies: 1
    Last Post: 09-08-2015, 08:12 PM
  3. Macro for multiple webpages query
    By pathfinderwm in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-17-2013, 04:47 PM
  4. Help w/ web query or macro to pull single table spaning multiple web pages into 1 sheet
    By lfrank22001 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-03-2013, 08:22 AM
  5. [SOLVED] Web Query Macro Change, New Page per Query
    By Floydlevedale in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-11-2012, 06:27 AM
  6. VBA Web Query Macro, Offset Multiple Rows Looping
    By huey in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-30-2009, 06:42 PM
  7. Web Query macro runs w/o Query installed?
    By ern2ern in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-28-2007, 01:24 PM

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