Export query to Excel worksheet and range

  • Thread starter Thread starter Carl
  • Start date Start date
C

Carl

I fugured out how to export a query to an Excel spreadsheet, but that code:
docmd.OutputTo Seems to take the output and make it the entire workbook
results. How do I take the query and make it export to the 'TargetFile'
workSheet("Data") beginning Cells(10,1)?

And then what is the lingo to run an Excel macro from Access?

This would be a great help
thanks
carl
 
Carl:

One alternative would be the Excel CopyFromRecordset method. The following
KB article gives more information.

http://support.microsoft.com/kb/246335/en-us

To execute a macro in Excel from Access you can use the Run method of the
Application object.

http://msdn.microsoft.com/library/d...y/en-us/vbaxl11/html/xlmthRun1_HV03088345.asp

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


I fugured out how to export a query to an Excel spreadsheet, but that code:
docmd.OutputTo Seems to take the output and make it the entire workbook
results. How do I take the query and make it export to the 'TargetFile'
workSheet("Data") beginning Cells(10,1)?

And then what is the lingo to run an Excel macro from Access?

This would be a great help
thanks
carl
 
Back
Top