Export to specific worksheet in Excel file

  • Thread starter Thread starter Chuck
  • Start date Start date
C

Chuck

Is there a way to export a table (or query) to a specific worksheet in an
Excel file ?
Docmd.transferspreadsheet doesn't seem to allow it. Using both Access 2000
and 2002.

Thanks
 
Chuck,

In A2K, one of the arguments of TransferSpreadsheet is Range. If you specify
something there that is not actually a range in the target workbook, Access
will create a worksheet with that name! If a worksheet by that name already
exists, it will be overwritten.

Not sure it was intended for this use, but it works pretty nice, both in
macros and VB code.

HTH,
Nikos
 
Back
Top