Multiple Excel Sessions

G

Guest

Hello,

Problem: After I run a macro it creates an additional session in Excel, and
it remains after I have completely closed Excel. I know it is still running,
because in the task manager it shows EXCEL.EXE, except Excel is not open.

The macro is stored as an add-in and is referenced through a custom toolbar
button. Within the code, the macro updates Access with information using the
transferspreadsheet method, then runs an Access query, and then pulls the
query data back into excel. I am not sure if this is the cause or if it is
something else, maybe something to do with one of the userforms I have in
Excel.

Any suggestions or possible causes?

Thank You,
 
G

Guest

That usually has to do with not cleaning up all of your objects when things
are closing. Any place where you "Set" and object, make sure to "Set" it to
nothing prior to closing the project. A good place to look would be in your
records sets and connections...
 
G

Guest

Thank You,

I did find one section where I was setting a rng = Range, and a couple of
others where I was declaring variables as a worksheet or a field. However,
the problem still occurs. All of the Access objects are as well as the Excel
objects above are Set = Nothing before the code finishes. Could this possibly
occur from setting the objects to nothing --- to often? I set the Access
objects to nothing after each occurance, which is probably unnecessary, but I
didn't think that should be a problem.

What do you mean by records sets and connections.... Are you refering simply
to the code where I use the Set command, or is there a option to search for
this type of activity?

Thanks for your help!!
 

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