Thanks for your help. I'm not sure why I had a problem with just the open & close part (of course it's working ok now), but I changed a couple things in the code, and it appears to be closing properly now.
One thing I changed was:
Worksheets.Add().Name = rst![EmpName]
to...
You're kidding. You both ran this code from within an Access module, checked the task manager (before closing Access), and saw no instance of Excel running? I am using windows XP and Office Pro 2007. What versions are you both using?
Yes, I ran the code after checking the task manager to ensure Excel was not running. I also tried this Dim objXLApp As Object, no change. Excel still stays open until I close Access. Try it yourself and see.
I did not post the code in between because I ran it just like this and it caused the same problem. Therefore, your hyperlink does not resolve the issue. Also, I do tie the code to the specific application object I have instantiated.
What do you mean by "turning it off and on again"?
When I create an instance of Excel using VBA within Access, then close Excel (using the quit method), it leaves the instance running (visible in the task manager). If I close Access, the instance disappears from the Task Manager.
Dim objXLApp As Excel.Application
Set objXLApp =...