R
RFrechette
Hi All,
I have been trying to export an Access Rpt into Excel and I'm not having
much luck.
I need the formatting of the report as far as the grouping and sorting.
Here's the 3 options I've tried so far:
Sub OutputToExcel()
DoCmd.OutputTo ObjectType:=acOutputReport, _
ObjectName:="rpt_Main_Sheet", _
OutputFormat:=acFormatXLS, _
OutputFile:="C:\test.xls", _
AutoStart:=True
End Sub
-------------------------------------
Sub OutputToExcel()
DoCmd.OutputTo acOutputReport, _
"rpt_Main_Sheet", _
acFormatXLS, _
"C:\test.xls", _
True
End Sub
-------------------------------------
DoCmd.OutputTo acReport, "rpt_Main_Sheet", acFormatXLS, "C:\test.xls", True
-------------------------------------
For each one, I get the following error when I run it...
Run-Time Error 2001
You canceled the previous operation.
Can somebody please help me?
Thank you so much in advance.
R Frechette
I have been trying to export an Access Rpt into Excel and I'm not having
much luck.
I need the formatting of the report as far as the grouping and sorting.
Here's the 3 options I've tried so far:
Sub OutputToExcel()
DoCmd.OutputTo ObjectType:=acOutputReport, _
ObjectName:="rpt_Main_Sheet", _
OutputFormat:=acFormatXLS, _
OutputFile:="C:\test.xls", _
AutoStart:=True
End Sub
-------------------------------------
Sub OutputToExcel()
DoCmd.OutputTo acOutputReport, _
"rpt_Main_Sheet", _
acFormatXLS, _
"C:\test.xls", _
True
End Sub
-------------------------------------
DoCmd.OutputTo acReport, "rpt_Main_Sheet", acFormatXLS, "C:\test.xls", True
-------------------------------------
For each one, I get the following error when I run it...
Run-Time Error 2001
You canceled the previous operation.
Can somebody please help me?
Thank you so much in advance.
R Frechette