I have been trying to open a spreadsheet from access after exporting information from a query. I don't get any errors but it doesn't open. The OutputTo command works and opens excel but it erases the pivot tables that I have set up. I was wondering if anyone could look at my code and see what is wrong. (I have the excel 9.0 references)
Private Sub Command0_Click()
Dim XL As Excel.Application
Set XL = New Excel.Application
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "BySchoolReport", "c:\BSS\AdditionalDescriptions.xls"
XL.Workbooks.Open "C:\BSS\AdditionalDescriptions.xls"
End Sub
Oh yeah I have Excel and Access 2000 on a WINNT machine.
Private Sub Command0_Click()
Dim XL As Excel.Application
Set XL = New Excel.Application
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "BySchoolReport", "c:\BSS\AdditionalDescriptions.xls"
XL.Workbooks.Open "C:\BSS\AdditionalDescriptions.xls"
End Sub
Oh yeah I have Excel and Access 2000 on a WINNT machine.