Hello
I have a query in Access 2007 saved as PivotTable. I would like to export this pivot table to Excel and keep its pivot table format. The name of the query is RN-pivot.
I tried to create a button that will run the query and export it to Excel. I tried this code in the Click event of the button, but something is missing...Can anyone please help.
DoCmd.OpenQuery "RN-pivot", acViewPivotTable, acReadOnly
PivotTable.Export "RN-pivot", plExportActionOpenInExcel
thanks