ms query editor question

J

Joseph Atie

Is there a way to use a cells from an excel sheet as a parameter in an ms
query editor query?

i assume i could do it using vba by changing the query before i run the script

is there a better way / a way to do it from ms query.

I tried using a cell reference but ms query would not accept it

i.e =Interface!B5

Thanks in advance

Joseph Atie
 
J

Jacob Skaria

Get the value to a variable and use that within your query.

Dim varTemp as variant

varTemp = Workbooks("<bookname>").Sheets("Interface").Range("B5")

If this post helps click Yes
 
F

FSt1

hi
assuming that you have a parameter query already, right click the query
range and from the popup, click parameters. a parameter dialog with 3 options
will appear.
1. prompt for input ie input box
2. use a fixed value
3 use value from the following cell.

you want option 3.

if the parameter icon on the popup is grayed out, this means you don't have
a parameter query yet and you must set one up first. the logic (i think) is
that you can't edit a parameter query until you have a parameter query to
edit.

post back if you have more questions.

Regards
FSt1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top