Hi All,
I'm exporting a query from my db to "sheet1" in spreadsheet "test1.xls". This works fine except that I need it to overwrite the data in "sheet1" if it exists, what actually happens is it creates a new sheet ie "sheet11". According to other post this code should overwrite?! I need it to this because I have calculated controls on other sheets referencing "sheet1".
Can anyone help?
Function ExportToExcel(Path As String)
Path ="\\10.1.1.244\Folder\Folder\test1.xls"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "Qry_Name", Path, False, "Sheet1"
End Function
Thanks for the help in advance.
Matt
I'm exporting a query from my db to "sheet1" in spreadsheet "test1.xls". This works fine except that I need it to overwrite the data in "sheet1" if it exists, what actually happens is it creates a new sheet ie "sheet11". According to other post this code should overwrite?! I need it to this because I have calculated controls on other sheets referencing "sheet1".
Can anyone help?
Function ExportToExcel(Path As String)
Path ="\\10.1.1.244\Folder\Folder\test1.xls"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel97, "Qry_Name", Path, False, "Sheet1"
End Function
Thanks for the help in advance.
Matt