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.
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.