Share via

EXCEL 2007 crashes after i run vba code and close the file and reopen it...

Anonymous
2010-08-12T19:43:20+00:00

Hi,

  I am on a server running windows XP professional along with Excel 2007...I have a few excel 2002 workbooks that link to each other..I converted them all to excel 2007 using the converter.. and when I was running a macro it kept on crashing excel..so i first deleted any empty rows and columns..and reran the code..and it went a bit further before it crashed...i then rewrote the code by changing how the code reads the data..before it used to read whole columns and rows and this created huge memory problems..but i re-wrote the code to encompass only the data it requires from the spreadsheet...i also did a few vba tricks like turn calculations and updating off and setting objects as nothing etc...re-writing the code finally enabled me to run through the whole macro without Excel crashing..problem now is that whenever i run the macro and close the file...whenever i try to reopen the same exact file, Excel always crashes...keep also in mind that the macro i am using is an add-in..i also tried closing the add-in before opening the file again..and Excel still crashes..please help

one more thing to note..these macros and spreadsheets do just fine in excel 2002

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Most helpful
  1. Anonymous
    2017-03-26T15:42:32+00:00

    I don't know if this applies to your problem but hear this out...

    I've had the same problems with a fairly straightforward spreadsheet with vba code...

    Looked into removing all add-ins, especially active-x ones, nope...  Tried rewriting the code, spend hours trying to figure out where I missed out, nope.

    I got very frustrated writing code for 10 minutes and then oups, another crash.

    I must have saved about 50 different incremental version of my spreadsheet and it was very hard to keep track of the logic of my code under these conditions...

    It got to a point where I could 'sense' Excel was about to crash : Quick save ! Naw, too late. Then it hit me ! Turned off AutoSave and bingo !  Never that problem again.

    Hope this helps...

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2010-08-19T16:12:43+00:00

    Thanks Bill...I would love to send you a spreadsheet, however we have a web of spreadsheets that this particular macro opens and closes and would just be way too much to send you...my next steps are to test in excel 2010 and see what happens.

     However , if anybody can help me or seen this issue before please let me know..thanks

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2010-08-14T06:33:50+00:00

    Difficult to help without more information or the ability to see the problem myself.

    If you want to email me a workbook prior to running the macro, together with instructions on how to reproduce the problem I will see if I can get anywhere.

    Alternatively get Microsoft support involved.

    In my view, Excel should never crash.  When it does, Microsoft should be told and given the opportunity to fix whatever the problem is.

    I would encourage you to contact Microsoft support, pointing out that their product is deficient and that Excel crashing is causing you problems.

    They should give you a free of charge support incident and eventually find the cause of the problem and hopefully fix it.


    Bill Manville. Excel MVP, Oxford, England. www.manville.org.uk

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2010-08-12T19:44:37+00:00

    I also forgot to add that i tried running these spreadsheets on my personal drive and the same issue happens..i also tried deleting all temp data and deleting the xlb file and running diagnostics and still nothing..please help

    Was this answer helpful?

    0 comments No comments