Excel crashes while trying to save, add or delete rows

  • Thread starter Thread starter scaramushe
  • Start date Start date
S

scaramushe

Hi,
I am working on Excel 2003, Windows XP. The problem is that almost
every time i try to add or delete rows or columns or to move cells
Excel crashes. The same happens almost every time i'm attempting to
save the file, either before or after it saves, while calculating
cells. it happens even more often when i am trying to use "save as".
The file is 10 MB, without much formatting but with lots of vlookups
and cimilar finctions.
I tried to open it on different computers but the result was the same.
Please help me to repair the file.
Thanks,
 
Can't help with the info provided, but one thing to try is to carefully
ensure you release every Excel object you instantiated as described in
the following kb article:

http://support.microsoft.com/default.aspx?scid=KB;EN-US;q317109

If you do this right, you should not need to call GC.Collect to get
Excel to quit.

But it's not easy to ensure it's right for all code paths including
exceptions, and for all versions of the code including ones which will
be modified by a maintenance programmer a few months down the road...

One way to get round the problem of unreleased references is to write
all the Excel interop code in a VB6 ActiveX DLL, never exposing any
Excel objects to managed code. Your managed code than instantiates a
single instance of the VB6 ActiveX object and uses it to interop with
Excel. When you release the instance of your VB6 ActiveX object, it
uses classic VB6 reference counting to release all Excel references.


-via135
 
Thanks for the reply, but i don't really know how to take advantage o
it, because I'm not familiar with how to access interop code.
I'll try to add as much information as I can:
Excel crashes while trying to calculate cells, my guess is that it ha
to do with not freeing the memory. When i worked on another computer
it was fine for an hour or so but then started crashing.
It may have to do with not releasing the objects but i don't know ho
to call or release them.
What more information should I supply?
Is there a way to find the exact source of the problem?
If accessing the code is the solution, how to do this?


Thank
 

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

Back
Top