I'm writing a code in vba Access 2002 a button to open an Excel file do some work and close it and it works but if you refresh and clik again the button get an error "object variable or with block not defined" In the Task Manager from Windows I see the Excel process running even if the file is close....the code vba did not kill the process when exiting the code, so I have to close the application and re-start.
How can I close the file and kill the process in order to open Excel files without exiting the application?
Thank you
This is part of the button code:
Bookmarks