N
nxqviet
Hi,
I need help with a function that allow me to execute a macro in Excel.
Secifically, I was able to transfer 2 tables from access to Excel. But
this code seem to work only when the target excel file is not open.
What I really need is: Transfer the tables (regardless of the target
file is open or not), then run a macro in that target excel file. How
do i do that?
My question is, if the file is not open. Can I still run the macro? If
not, then how do I open the file after transfer the tables, and before
running the macro. The macro's Name is "Template"
Here is my transfer code:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8,
"tblExportPack", "C:\Template.xls", , "Packages"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8,
"tblExportProducts", "C:\Template.xls", , "Products"
Thanks
V
I need help with a function that allow me to execute a macro in Excel.
Secifically, I was able to transfer 2 tables from access to Excel. But
this code seem to work only when the target excel file is not open.
What I really need is: Transfer the tables (regardless of the target
file is open or not), then run a macro in that target excel file. How
do i do that?
My question is, if the file is not open. Can I still run the macro? If
not, then how do I open the file after transfer the tables, and before
running the macro. The macro's Name is "Template"
Here is my transfer code:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8,
"tblExportPack", "C:\Template.xls", , "Packages"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8,
"tblExportProducts", "C:\Template.xls", , "Products"
Thanks
V