Exporting a pivot table into excel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Im using a form that links its parameters (combo boxes) to a query and
displays a subform in pivot table view underneath these parameters. All I
want to do is be able to export the subform (pivot table) into excel. I can
go into the subform itself and click 'export to microsoft excel' but i do not
want to do that.
Thanks to those who can help.
 
I figured something out. I just open the subform and export it to excel with
the docmd. Than close the subform. Here is the code

Private Sub ExportToExcelCommand_Click()

DoCmd.OpenForm "Subform", acFormPivotTable
DoCmd.RunCommand acCmdPivotTableExportToExcel
DoCmd.Close

End Sub
 
Back
Top