View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Second instance of Excel

sounds like you still have a reference to Excel in your code. This could be
created inadvertenly because you don't fully qualify your reference. For
example

x.ActiveCell.Sort Key1:=Range("A1")

the Range("A1") is not qualified from x and creates a "ghost" reference
which can not be released.

--
Regards,
Tom Ogilvy


"Dom" wrote in message
...
I use something like the following in VB:

dim x as Excel.application
set x = excel.application
x.Visible = true
[... use x ...]
call x.quit
set x = nothing

This works fine, but just for the first time. When I call
it again, Excel starts up, but I only get the window frame
and the caption. The client area in transparent.

Can someone tell me what I am doing wrong? I'd appreciate
if responses were sent to my email address, because I
don't come here often.

Dom