Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell value for Query
Hi All......
I have a line of code used to run a MSQuery. It works fine as is, but I would like to extract the hard coded 165167 and instead obtain it from a cell value or preferably from an InputBox............ Here's the code snippet...... & Chr(10) & "WHERE (WO.WONUM='165167')" _ Any help would be much appreciated........ Vaya con Dios, Chuck, CABGx3 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell value for Query
& Chr(10) & "WHERE (WO.WONUM='" & Range("A1").Value & "')" _
would be one way. Range("A1") can be replace with inputbox. There is also a parameter query option with a query table. This is part of the definition of query, so it can pop up its own box or get the value from a cell. See these links for that possibility http://nickhodge.co.uk/gui/datamenu/...taexamples.htm http://www.dicks-clicks.com/excel/Ex...htm#Parameters -- Regards, Tom Ogilvy "CLR" wrote: Hi All...... I have a line of code used to run a MSQuery. It works fine as is, but I would like to extract the hard coded 165167 and instead obtain it from a cell value or preferably from an InputBox............ Here's the code snippet...... & Chr(10) & "WHERE (WO.WONUM='165167')" _ Any help would be much appreciated........ Vaya con Dios, Chuck, CABGx3 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell value for Query
Thanking you very much, kind Sir, worked like a charm...............it's good
to see you! Vaya con Dios, Chuck, CABGx3 "Tom Ogilvy" wrote: & Chr(10) & "WHERE (WO.WONUM='" & Range("A1").Value & "')" _ would be one way. Range("A1") can be replace with inputbox. There is also a parameter query option with a query table. This is part of the definition of query, so it can pop up its own box or get the value from a cell. See these links for that possibility http://nickhodge.co.uk/gui/datamenu/...taexamples.htm http://www.dicks-clicks.com/excel/Ex...htm#Parameters -- Regards, Tom Ogilvy "CLR" wrote: Hi All...... I have a line of code used to run a MSQuery. It works fine as is, but I would like to extract the hard coded 165167 and instead obtain it from a cell value or preferably from an InputBox............ Here's the code snippet...... & Chr(10) & "WHERE (WO.WONUM='165167')" _ Any help would be much appreciated........ Vaya con Dios, Chuck, CABGx3 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to use the value in a cell to run a query | Excel Discussion (Misc queries) | |||
Go to cell - Query | Excel Worksheet Functions | |||
Web Query for a Single Cell | Excel Discussion (Misc queries) | |||
Query on Cell | Excel Discussion (Misc queries) | |||
web query based on cell value | Excel Programming |