Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Copy the results of an Access query into an Excel spreadsheet

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 634
Default Copy the results of an Access query into an Excel spreadsheet

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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Copy the results of an Access query into an Excel spreadsheet

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



"Ken Wright" wrote in message ...
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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 634
Default Copy the results of an Access query into an Excel spreadsheet

You're welcome :-)

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------


<snip


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.727 / Virus Database: 482 - Release Date: 26/07/2004


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
No Results returned from Access query Chuck W[_2_] Excel Discussion (Misc queries) 3 September 23rd 09 03:37 PM
Remove Access query name title from Excel spreadsheet Pat Excel Discussion (Misc queries) 1 September 5th 07 03:26 PM
Access macros in Excel - populate results in spreadsheet Dawn Excel Discussion (Misc queries) 3 August 28th 07 12:30 AM
Why are access query results different in Excel DannyD Excel Discussion (Misc queries) 0 July 29th 07 04:54 AM
Access query results to Excel piano banger Excel Discussion (Misc queries) 4 December 8th 06 09:32 AM


All times are GMT +1. The time now is 09:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"