Automating Excel

J

John

I am having problems automating Excel. I use Excel to
display and print a table from AutoCAD. From a user form
in AutoCAD I create an excel process and create the table,
then I make Excel application visible. The user form is
then unloaded and the object references to Excel are set
to nothing. Now, my problem is that I can't find the best
way to terminate the excel process. I want the user to
close and terminate Excel after printing. Right now it
always leaves the process running. Can someone tell me
which is the best way to do this? Should I start and
terminate Excel from the user form? TIA.
 
F

Fredrik Wahlgren

John said:
I am having problems automating Excel. I use Excel to
display and print a table from AutoCAD. From a user form
in AutoCAD I create an excel process and create the table,
then I make Excel application visible. The user form is
then unloaded and the object references to Excel are set
to nothing. Now, my problem is that I can't find the best
way to terminate the excel process. I want the user to
close and terminate Excel after printing. Right now it
always leaves the process running. Can someone tell me
which is the best way to do this? Should I start and
terminate Excel from the user form? TIA.

Use Application.Quit
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top