Export Access Pivot table to Excel via VBA

W

Will

I have a macro that open a from as a pivot table and
exports to Excel in pivot table format. I converted the
code to VB, but when I run it, I get a run time error 2501
on line 2. How do I fix this. Thanks

Code
DoCmd.OpenForm "Form_Name",_
acFormPivotTable, "", "", , acNormal
DoCmd.RunCommand acCmdPivotExportToExcel 'error is here
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top