G
Guest
Hi,
In VBA, I'm exporting data from Access to Excel and then open the xls. I use
the following code:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, Myqry,
test.xls
Call Shell("Excel.exe test.xls", 1)
So far OK.
Now I want to use a template xlt, so that the user gets a copy xls and
cannot alter the content of the xlt. However,
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, Myqry,
test.xlt
Call Shell("Excel.exe test.xlt", 1)
export OK, but opens directly the xlt in stead of a copy xls. What can I do
to realize the last?
An even better approach would be to first make a copy and then export to and
open that copy. What is the code to make that copy?
Thanks for suggestions,
Henk
In VBA, I'm exporting data from Access to Excel and then open the xls. I use
the following code:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, Myqry,
test.xls
Call Shell("Excel.exe test.xls", 1)
So far OK.
Now I want to use a template xlt, so that the user gets a copy xls and
cannot alter the content of the xlt. However,
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, Myqry,
test.xlt
Call Shell("Excel.exe test.xlt", 1)
export OK, but opens directly the xlt in stead of a copy xls. What can I do
to realize the last?
An even better approach would be to first make a copy and then export to and
open that copy. What is the code to make that copy?
Thanks for suggestions,
Henk