I want to export a ms query to an excel sheet template to a specific cell range.
I would like the export results to begin at cell "a6".
I have googled myself to exhaustion, trying many suggestions. The common opinion is that the following code should work, (but it does not for me).
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qtestexport", "c:\United\teamtemp.xlsx", True, "teamtemp!A6:a90"
End Sub
[I am using office 2007]
Teamtemp.xlsx is the template and teamtemp is the worksheet name. I have tried leaving it at sheet1 with no results.
The error here tells me that the range already exits. This is one of the many errors I have received.
I have run the code where it creates another sheet, but not in the template.
Any help, suggestions or solutions is greatly appreciated.
Thanks in advance
John
I would like the export results to begin at cell "a6".
I have googled myself to exhaustion, trying many suggestions. The common opinion is that the following code should work, (but it does not for me).
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qtestexport", "c:\United\teamtemp.xlsx", True, "teamtemp!A6:a90"
End Sub
[I am using office 2007]
Teamtemp.xlsx is the template and teamtemp is the worksheet name. I have tried leaving it at sheet1 with no results.
The error here tells me that the range already exits. This is one of the many errors I have received.
I have run the code where it creates another sheet, but not in the template.
Any help, suggestions or solutions is greatly appreciated.
Thanks in advance
John