Excel corrupted - automation error

M

mbobro

Hi,

I've got the automation error -2147417848 (80010108). The objec
invoked has disconnected from its clients.

It happen while trying to save.as workbook.

The problem is I've used the absolutely same code several times and i
worked well. Then suddenly it appeared and I can't avoid it.

I've tested and I'm sure this is when I save, as when I made comment
on this save.as line it goes smoothly.

I've tried to repair and then reinstalled Office XP with no results.
I've exported all the modules from Excel Workbook I use for carryin
this macro and imported into a blank new one with no effects as well.

Please help me what should I do apart from using my previous, bu
working version of a file. This Excel corruption hapepned to me alread
a few times and it's really annoying because I had to rewrite lots o
code again. Moreover after such a event I do not trust the code as i
may be corrupted also somewhere else where I can't see it now

My configurations:

AMD Thunderbird 1.4 MHz
Win XP
Office XP (used to be SP-2 with all updates, now just blank Office XP)

Virus infection always possible, but I use Norton Antivirus & Norto
Internet Security + some antitrojan software.

Thanks,


Mik
 
D

Dave Peterson

The last time I got an error like this, I had a line that closed one workbook,
then I tried to save another.

My mistake was that I tried to save the workbook that I just closed.

Maybe you could set up a watch and a breakpoint in your code (right before your
..saveas line) and see what your workbook variable actually contains.
 
M

mbobro

Thanks for help!

Finally it seems to me the reason was is the corrupted *.xls repor
file.

After copying the contents of all pages and modules into a new workboo
I realized there is also a bit corrupted chart (I could edit it, bu
after saving and opening it came back to the original not edite
shape).

After making this chart again from scratches now it seems to be OK.

Thanks again.


Micha
 
D

Dave Peterson

Glad you found the problem.

mbobro < said:
Thanks for help!

Finally it seems to me the reason was is the corrupted *.xls report
file.

After copying the contents of all pages and modules into a new workbook
I realized there is also a bit corrupted chart (I could edit it, but
after saving and opening it came back to the original not edited
shape).

After making this chart again from scratches now it seems to be OK.

Thanks again.

Michal
 

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