View Single Post
  #5   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 again,

Why not use CreateObject in all cases? Versus hijacking and quitting an
existing Excel instance.

In any case, for starters, try flipping:

Set xlapp = Nothing
xlapp.Quit

To

xlapp.Quit
Set xlapp = Nothing

You're trying to control an object variable which you have terminated from
memory.

Regards,
Nate Oliver