Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default ms query editor question

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default ms query editor question

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
---------------
Jacob Skaria


"Joseph Atie" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default ms query editor question

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

"Joseph Atie" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Query Editor question R_CAxcelis Excel Discussion (Misc queries) 0 November 20th 07 09:17 PM
VBA Editor How to Question Sandy Excel Programming 3 June 8th 07 01:46 PM
Microsoft Query editor opens but does not display in excel. Fizzbear Excel Discussion (Misc queries) 0 February 23rd 06 08:48 PM
QUERY: auto clean VB code editor? KevinGPO Excel Programming 1 November 29th 05 11:12 AM
Editor question Glen Mettler[_4_] Excel Programming 2 March 4th 05 05:44 PM


All times are GMT +1. The time now is 07:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"