-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to the Help article on TransferSpreadsheet (Access 2002) the
Worksheet Range cannot be designated for an export. The following are
from remarks on the FileName and Range parameters:
FileName:
"If the file name is the same as the name of an existing spreadsheet,
Access replaces the existing spreadsheet, unless you're exporting to an
Excel version 5.0 or later workbook. In that case, Access copies the
exported data to the next available new worksheet in the workbook."
Range:
"When you export to a spreadsheet, you must leave this argument blank.
If you enter a range, the export will fail."
You can go the other way - From Excel import the results of the Access
query into Excel. See Excel's Data > Get External Data option.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBQm6jWoechKqOuFEgEQKddQCgywEbYno+Mov+LtYdqpKOU6 7dWaYAnjbh
7x60qEkVsPKLzFAPa+pF6w+l
=3d76
-----END PGP SIGNATURE-----
Anne Sachleben via AccessMonster.com wrote:
I am using the TransferSpreadsheet function to export a query result to a
specific worksheet in an Excel file titled "report". I want the result to
be exported to the worksheet titled "facts". Here are the parameters I
entered:
Transfer Type: Export
Spreadsheet Type: Microsoft Excel 8-10
Table Name: facts query
File Name: C:\report.xls
Has Field Names: No
Range: facts
Instead of exporting to my existing "facts" worksheet, Access is creating a
new worksheet and titling it "facts1".
I'm using Access & Excel 2003.
Any thoughts on what I'm doing wrong? Thanks!