View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nate Oliver[_3_] Nate Oliver[_3_] is offline
external usenet poster
 
Posts: 71
Default Excel not quitting - How to avoid global reference?

Hello,

You haven't shown a few important details in your post, including:

1) How you have declared (scope-wise) xlApp. Is the variable declared within
the procedure or outside of the procedure?
2) Where you attempt to Quit the Application. I.e.,

xlApp.Quit

Yes, you certainly can create an Excel Application variable with scope
limited to the procedure, it would be declared similarly as you've declared:

Dim objChart as Object

Within the procedure.

Regards,
Nate Oliver