VBA Crashing XL on reload

G

Guest

I have an outlook macro, automating XL. Pseudo code follows

begin
If XL running
use existing instance
else
create new instance

open workbook( filename )
make changes to workbook
end

The crash occurs if I reload the workbook I opened. I cannot close the
workbook programmatically since the point of the macro is to allow the user
to examine the changes. Has anyone seen anything like this before?

Many thanks,
Andrew.
 
T

Tom Ogilvy

Check the task manager and see if Excel is already running. I don't believe
GetObject will discover this situation if Excel is "hung up" because you
code has failed to release a reference to it.
 

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