Copy the results of an Access query into an Excel spreadsheet

L

lylo

Hi,

I have a macro in excel, and I would like to add a sub that would
- open Access
- Copy the results of a query into a new spreadsheet of my workbook
- close Access

Thanks

lylo
 
K

Ken Wright

Have you tried just using the Data / Import External data option which will
allow you to query Access? Recording the macro will give you the syntax, you
can query as you would in Access and you won't even need to open Access, and you
can then choose to return the results to a sheet in your Excel workbook.
 
L

lylo

Hi !

Yes, it's working thanks a lot. I don't even need to write a macro as
the table would refresh each time the worksheet is opened !

Cheers

lylo
 
Top