Force Excel to close
Application.Quit is the appropriate method of closing the application.
However, certain protocol should be followed in using it. Be sure that all
files for that instance of the application are closed before before
executing the Quit command. To avoid error or run time messages, when
closing the files, establish their saved status. Either save them, use the
Saved = True or SaveChanges = False to avoid the messages. A review of the
VBA help file on these topics might provide additional assistance.
"Nigel" wrote in message
...
I am running some automated reports and using a batch file to run them in
sequence, one issue I am having is forcing each report to close after it
is
complete, the command I am using is
application.quit but this seems to be very flaky, is there a better way to
force excel to close when the report is complete
thanks
|