jjoy123123
Programmer
I'm trying to close my excel application after displaying the spreadsheet. I know that in order to release the memory, I have to:
excel.application.close
excel.application = nothing
However, since I'm displaying the Excel report, the user closes it by clicking on the X in the Excel window. After doing this, there is still an instance of Excel running in my task manager. Is there anyway to execute the above 2 lines of code when a user clicks on the X to close the Excel window?
excel.application.close
excel.application = nothing
However, since I'm displaying the Excel report, the user closes it by clicking on the X in the Excel window. After doing this, there is still an instance of Excel running in my task manager. Is there anyway to execute the above 2 lines of code when a user clicks on the X to close the Excel window?