I'm using an access database that gathers information from an external program it then takes the gathered information and outputs to an excel file
Sometimes this generates an error (error talking between access and other application) and since I have the excel workbook created close to the start of the routine and have it hidden I want to close the Excel application, currently I use this code
objxlapp.ActiveWorkbook.Saved = True
objxlapp.Quit
(where objxlapp is the excel application)
This code works just fine most of the time...
Sometimes it is not the communicating between access and other program that generates the error, sometimes a user forgets to input some required information into a form. When this happens the Excel appliaction has not been started and there is nothing to end, thus generating another error. Anyone have any ideas as to check and see if the Excel process is running and if so end it?
Sometimes this generates an error (error talking between access and other application) and since I have the excel workbook created close to the start of the routine and have it hidden I want to close the Excel application, currently I use this code
objxlapp.ActiveWorkbook.Saved = True
objxlapp.Quit
(where objxlapp is the excel application)
This code works just fine most of the time...
Sometimes it is not the communicating between access and other program that generates the error, sometimes a user forgets to input some required information into a form. When this happens the Excel appliaction has not been started and there is nothing to end, thus generating another error. Anyone have any ideas as to check and see if the Excel process is running and if so end it?