Quote:
|
Originally Posted by Wim Venema
How to open MSQuery in a macro in Excel, creating a query
and return the result in a worksheet.
|
Hi,
Not exactly sure how to do that from scratch but my way of doing it would be to go to Tools/Macro/Record a new macro, then go to Data/GetExternalData/NewDatabaseQuery and create a Query to pull in your data from wherever. Then go into your Tools/Macro/VisualBasicEditor when done and in the VBE editor see the code for the macro. But like I stated, that's the way I would do it and have done it, but may not be the best. Mainly use Access so not all that keen on Excel. Hopefully someone will help you out with more expertise.
have a nice one,
Bud
