Close excel

  • Thread starter Thread starter ckerns
  • Start date Start date
C

ckerns

How do I close all instances of Excel so that none will appear in Task
Manager when Access closes?

tia
 
As Arvin Meyer points out, if you have an explicit programmatic reference to
Excel, you must close all workbooks, Quit the object, and set it to Nothing.

If there are other instances of Excel you need to close, you can use
Set objXL=GetObject(,"Excel") ' Warning ... Air code!
then take the same steps with that object.
You can do this in a loop until it throws an error because there are no more
objects to get.

Remember, though, that this procedure will also close any unrelated
instances of Excel which happen to be running on the PC.
Some users might not be too happy to have their other work closed any time
they use your application!

HTH
- Turtle
 
Thanks guys. I appeciate the help. Still not sure what I'll do here,
but now I see how to do it.
 
Back
Top