HELP - From Access to Excel File and come back.

luigen

New member
Local time
Today, 19:34
Joined
Apr 2, 2007
Messages
9
Hi. I have another problem.
At my office I have an excel file with a macro inside that import automatically data from a 3270 emulator (host). It's working fine.
So i developped an Access application to menage this importation and I would like to call the excel file directly from Access with a command button.
The problem:

when I close the excel file from a command button with APPLICATION.QUIT, Excel don't close. Only the file quit.
Is it possible when the importation is terminated to close (from my excel file) the file and Excel too and return focus to Access?

if yes, how?

Thanks
Luigi
 
Another post recently noted this problem. I think the short answer is that after you quit the application, there is still the application object variable. So after the object.workbook.close and the object.quit, you have to do something similar to

set object = nothing

where "nothing" is an Access keyword used to de-reference objects. It is the moral equivalent of NULL for object-type variables.

Search this forum for the other articles on "Application won't close" or similar titles.
 
Thanks a lot. It's working fine!!!!!
Luigi
 

Users who are viewing this thread

Back
Top Bottom