VBA Crashing XL on reload

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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.
 
Back
Top