A
Ang
Hi,
I am trying to export from Query to Excel Spreadsheet without seeing Query.
I did open Query but not exporting to Excel Spreadsheet. I have a list of
queries that should export to Excel Spreadsheet.
Your help would be much appreciated.
Thanks.
Ang
*********************************************************************
Private Sub cmdExportToExcel_Click()
On Error GoTo Err_cmdExportToExcel_Click
Dim RetVal
DoCmd.OpenQuery Me!lstQuery
DoCmd.TransferSpreadsheet acExport, 8, , "C:\Temp\test", True, ""
RetVal = Shell("C:\Program Files\Microsoft Office\office\excel.exe
C:\Temp\test.xls", 1)
Exit_cmdExportToExcel_Click:
Exit Sub
Err_cmdExportToExcel_Click:
MsgBox Err.Description
Resume Exit_cmdExportToExcel_Click
End Sub
**********************************************************************
I am trying to export from Query to Excel Spreadsheet without seeing Query.
I did open Query but not exporting to Excel Spreadsheet. I have a list of
queries that should export to Excel Spreadsheet.
Your help would be much appreciated.
Thanks.
Ang
*********************************************************************
Private Sub cmdExportToExcel_Click()
On Error GoTo Err_cmdExportToExcel_Click
Dim RetVal
DoCmd.OpenQuery Me!lstQuery
DoCmd.TransferSpreadsheet acExport, 8, , "C:\Temp\test", True, ""
RetVal = Shell("C:\Program Files\Microsoft Office\office\excel.exe
C:\Temp\test.xls", 1)
Exit_cmdExportToExcel_Click:
Exit Sub
Err_cmdExportToExcel_Click:
MsgBox Err.Description
Resume Exit_cmdExportToExcel_Click
End Sub
**********************************************************************