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.
--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03
----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------
"lylo" wrote in message
om...
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
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com).
Version: 6.0.726 / Virus Database: 481 - Release Date: 22/07/2004