I'm trying to find a way to export my query results to a new blank workbook (some might call this an excel instance). So far all I can do is export the result into an excel file then open it using the following;
Private Sub cmdEXPORT_EXCEL_Click()
DoCmd.TransferSpreadsheet acExport, 8, "qryBASE_DATA_QUERY2", "C:\WINNT\TEMP\TEMP_MASTER_EXP_EXPORT"
Application.FollowHyperlink "C:\WINNT\TEMP\TEMP_MASTER_EXP_EXPORT.XLS", , True
End Sub
What I would like to do is, everytime the user clicks the export button it opens a new workbook in excel (even if they do multiple exports). Then when the user goes into excel they can then save these temp workbooks wherever they wish.
I hope this makes sense.
Private Sub cmdEXPORT_EXCEL_Click()
DoCmd.TransferSpreadsheet acExport, 8, "qryBASE_DATA_QUERY2", "C:\WINNT\TEMP\TEMP_MASTER_EXP_EXPORT"
Application.FollowHyperlink "C:\WINNT\TEMP\TEMP_MASTER_EXP_EXPORT.XLS", , True
End Sub
What I would like to do is, everytime the user clicks the export button it opens a new workbook in excel (even if they do multiple exports). Then when the user goes into excel they can then save these temp workbooks wherever they wish.
I hope this makes sense.