Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004

    Question Unanswered: macro to change and run query??

    I've been working on importing some info into excel from a database(not access). I was wondering if someone could help me with a little snag i've run into.....

    Is there any way to create a macro that will bring up an input box and info entered into the input box change the query and then run it? There are two fields throughout my query that need to be changed from day to day, and i thought a macro would be a much easier way to change the query and import the data.

    Thanks in advance for your help!!

  2. #2
    Join Date
    Mar 2004
    I don't know anything about the input box, but if you would just put the parameters in 2 cells, you have a solution.

    I've found some great examples of this at :

    Goodluck !

    Pascal Winnen

  3. #3
    Join Date
    Jan 2004
    Simply assign the values that change to a variable and populate that variable with values from the input box. A combo or list box would be better to ensure the field names are correct. I'm not sure if you can do multi- select boxes in Excel (you can in Access) but that would be a way to go as well.

    Substitue the variables for your fields in the select statement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts