Sorry - that code line was from memory. the actual line is:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Query",
"C:\Query Export.xls", True
Darryl
"Tom van Stiphout" wrote:
> On Tue, 14 Oct 2008 11:21:02 -0700, Darryl
> <(E-Mail Removed)> wrote:
>
> My suspicion is you got the arguments wrong, AND you got the file
> extension wrong. This worked for me in A2007:
> docmd.transferspreadsheet acExport, acSpreadsheetTypeExcel9,
> "Customers", "c:\filename.xls"
>
> -Tom.
> Microsoft Access MVP
>
>
> >In doing some testing of a database conversion (2003 to 2007), one of my VB
> >codes exports a query to spreadsheet (docmd.transferspreadsheet acExport,
> >acSpreadsheetTypeExcel9, c:\filename.txt). When I run the code, the export
> >is not taking place. My suspicion is that since the code is trying to export
> >in 2000, but I'm running 2007, it's causing a conflict. Can anyone help me
> >resolve this?
>
|