Access: copy table to specified worksheet

ouestque used Ask the Experts™
What Vba do I need to copy a table in access 2007 to a specified worksheet in excel 2007?
Code needs to run while workbook is open. Code needs to paste to a specified worksheet. (I.e., pretend worksheet name= " sassafras" and worksheet is the 5th out of ten worksheets in the workbook.

This is the equivilant of right click on top left corner of table select copy, then right click top left corner spreadsheet and select paste.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2014
Take a look at this article

You have two speedy options:
* populate a variant array and then assign an excel range.value = that array
* populate an ADO recordset and then use an Excel range.CopyFromRecordset method, supplying your recordset variable as the parameter.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial