ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   MS QUERY (https://www.excelbanter.com/excel-programming/280493-ms-query.html)

Howie[_2_]

MS QUERY
 
I would like to be able to generate a query via a VBA
call, and would like the actual MS Query interface or a
wizard to allow the user to chose their own data source,
table, and sort criteria. Basically, I'd like to insert
data from a db or text file under program control.

Tom Ogilvy

MS QUERY
 
You may be able to do something like:

commandbars("Data").Controls("Get External &Data") _
.Controls("Run Save&d Query...").Execute

But you won't be able to maintain control over the process.

You might have to build your own interface and the setup the parameters to
the QueryTables.Add method.

--
Regards,
Tom Ogilvy


"Howie" wrote in message
...
I would like to be able to generate a query via a VBA
call, and would like the actual MS Query interface or a
wizard to allow the user to chose their own data source,
table, and sort criteria. Basically, I'd like to insert
data from a db or text file under program control.





All times are GMT +1. The time now is 02:08 PM.

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