Export/Save As Pivot Table from Access to Excel

maxsun08

Registered User.
Local time
Today, 05:28
Joined
Jul 27, 2012
Messages
15
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:

Code:
DoCmd.OpenQuery "qrysaURSDailyManningBySite", acViewPivotTable, acEdit
DoCmd.RunCommand acCmdPivotTableExportToExcel
I tried using this for the Save portion but no luck:
Code:
xlWB.SaveAs strFilePath & strFileName, xlNormal, False
Regards,
 

Users who are viewing this thread

Back
Top Bottom