ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Paste into a QueryTable (https://www.excelbanter.com/excel-programming/326120-paste-into-querytable.html)

Glenn1203

Paste into a QueryTable
 
I would like to form a SQL query that would Select Where a column value
equals a value in cell A1. I'm trying to write a macro that will copy the
value from the cell and paste it into a Database Query QueryTable box. Is
there an easier way to do this? Can I paste into a QueryBox?

Help is much appreciated. Glenn

Tom Ogilvy

Paste into a QueryTable
 
Just use a parameter query. You can assign the parameter to get its value
from a cell.

See Nick Hodges site for an example:

http://nickhodge.co.uk/gui/datamenu/...taexamples.htm

--
Regards,
Tom Ogilvy

"Glenn1203" wrote in message
...
I would like to form a SQL query that would Select Where a column value
equals a value in cell A1. I'm trying to write a macro that will copy the
value from the cell and paste it into a Database Query QueryTable box. Is
there an easier way to do this? Can I paste into a QueryBox?

Help is much appreciated. Glenn




Glenn1203

Paste into a QueryTable
 
Thanks, that worked well. Glenn

"Tom Ogilvy" wrote:

Just use a parameter query. You can assign the parameter to get its value
from a cell.

See Nick Hodges site for an example:

http://nickhodge.co.uk/gui/datamenu/...taexamples.htm

--
Regards,
Tom Ogilvy

"Glenn1203" wrote in message
...
I would like to form a SQL query that would Select Where a column value
equals a value in cell A1. I'm trying to write a macro that will copy the
value from the cell and paste it into a Database Query QueryTable box. Is
there an easier way to do this? Can I paste into a QueryBox?

Help is much appreciated. Glenn






All times are GMT +1. The time now is 12:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com