I have Access 2000 programmed to run a very simple code to run a query and OutputTo an Excel spreadsheet:
DoCmd.OutputTo acOutputQuery, "XLS Applicants", acFormatXLS, "C:\My RMBC Reports\Applicants.xls", True
If, however, the user attempts to run the code a second time, without closing the Excel spreadsheet, they get a Runtime Error. I need to know how to close the spreadsheet (if it is opened) and re-run the command.
Any help will yield my undying gratitude.