Good Day All,
I am using MS Office 2010 and trying to export a pivot table from a query to Excel then Save automatically. The following works exporting the pivot table to Excel but for the life of me I can't get it to Save using my strFileName and strFilePath:
I tried using this for the Save portion but no luck:
Regards,
I am using MS Office 2010 and trying to export a pivot table from a query to Excel then Save automatically. The following works exporting the pivot table to Excel but for the life of me I can't get it to Save using my strFileName and strFilePath:
Code:
DoCmd.OpenQuery "qrysaURSDailyManningBySite", acViewPivotTable, acEdit
DoCmd.RunCommand acCmdPivotTableExportToExcel
Code:
xlWB.SaveAs strFilePath & strFileName, xlNormal, False