I
Irina
I have a report that I can export to excel with no problems MANUALLY,
but when I create a command button for a user to click on and export
the same report to excel using VB Code,
I get an error message: Error 9 Subscript out
of range.
the code for the button is this:
Dim stDocName As String
stDocName = "rptClientReport"
DoCmd.OutputTo acOutputReport, stDocName, acFormatXLS,
"C:\Reports\ClientReport.xls"
Can anyone advise why this code does not work?
And yet if I go under file->export->
I can export the very same report with no issues?
please help
but when I create a command button for a user to click on and export
the same report to excel using VB Code,
I get an error message: Error 9 Subscript out
of range.
the code for the button is this:
Dim stDocName As String
stDocName = "rptClientReport"
DoCmd.OutputTo acOutputReport, stDocName, acFormatXLS,
"C:\Reports\ClientReport.xls"
Can anyone advise why this code does not work?
And yet if I go under file->export->
I can export the very same report with no issues?
please help