Second instance of Excel

D

Dom

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. (e-mail address removed)

Dom
 
T

Tom Ogilvy

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top