Hi,
i want to export a table to excel , open this file and execute a macro from another file.
the code i have now is :
Opening the excel file goes ok, running the macro however not.
How can this be done?
Thanks in advance
Erwin
i want to export a table to excel , open this file and execute a macro from another file.
the code i have now is :
Code:
DoCmd.OpenTable "Overzichtaanwezigheid", acViewNormal
DoCmd.RunCommand acCmdExportExcel
DoCmd.Close acTable, "Overzichtaanwezigheid"
Dim XL As Object
Set XL = CreateObject("Excel.Application")
XL.Workbooks.Open ("C:\Users\Erwin\Documents\Overzichtaanwezigheid.xlsx")
XL.Visible = True
XL.Run "d:\test.xlsm!Macro3"
Opening the excel file goes ok, running the macro however not.
How can this be done?
Thanks in advance
Erwin