Private Sub Command6_Click()
I had the below bit of code that worked fine in Access 97. But I cannot get the same Excel.Application to work in 2003.
I want the macro to export the query to excel. Then open excel and run a macros from the xls file.
Could you suggest how adapt this file to reflect 2003 coding.
Thanks
I had the below bit of code that worked fine in Access 97. But I cannot get the same Excel.Application to work in 2003.
I want the macro to export the query to excel. Then open excel and run a macros from the xls file.
Could you suggest how adapt this file to reflect 2003 coding.
Thanks
Code:
Private Sub Command6_Click()
Dim xlapp As New Excel.Application
'Outputs file
DoCmd.OutputTo acOutputQuery, "CashFlowDiffNonZero_DateFilter_old", acFormatXLS, "c:\Raw Data.xls", False
'starts excel
Set xlapp = New Excel.Application