T
Tamer Seoud
I created a user interface to view and print out reports.
One of reports needed to be viewed in Excel. I need to
open the excel sheet and output the query result from a
command's event click. The code I used returns error
message. Please advise. Thanks a million
The following is the code I used
Private Sub lbl_OpenSE_Rpt_Click()
Dim ExcelObj As Object
Set ExcelObj = CreateObject("Excel.Application")
ExcelObj.spreadsheet.Open "F:\ExcelTest.xls"
DoCmd.OutputTo acQuery, "qry_SE_Info", "MicrosoftExcel
(*.xls)", "F:\ExcelTest.xls", False, ""
One of reports needed to be viewed in Excel. I need to
open the excel sheet and output the query result from a
command's event click. The code I used returns error
message. Please advise. Thanks a million
The following is the code I used
Private Sub lbl_OpenSE_Rpt_Click()
Dim ExcelObj As Object
Set ExcelObj = CreateObject("Excel.Application")
ExcelObj.spreadsheet.Open "F:\ExcelTest.xls"
DoCmd.OutputTo acQuery, "qry_SE_Info", "MicrosoftExcel
(*.xls)", "F:\ExcelTest.xls", False, ""