I am using a pre-formatted workbook I designed with several local and global named ranges in Excel 2007. I have no problem inserting/deleting rows or columns when I first open the original version of the workbook. However, after I save it (with a new file
name), close it, and re-open it. I cannot insert/delete rows or columns, group/ungroup rows, etc. without Excel crashing. By crashing, I mean I get the form that states "Microsoft Excel has encountered a problem and needs to close..."
Here is some of the troubleshooting I've tried:
- If I insert a new, blank worksheet into the saved, re-opened and troublesome file, I can insert rows no problem. So, my conclusion is it's not the workbook, only the pre-formatted worksheets with local range names.
- I asked a colleague to try using this file on her computer, and she encounters the same issue as me. So, it's not necessarily my computer.
- I added a lot of named ranges of various types to a new, blank workbook, saved it, re-opened it, and had no issues inserting rows.
- The troublesome worksheets are not protected.
- There are no external links in the workbook.
- I typed "Option Explicit" at the top of every Worksheet and Module in VBA.
- I've tried changing to Manual Calc mode and Auto Calc mode.
- None of the problematic worksheets has any VBA code behind it.
- I tried inserting a row onto one of the troublesome worksheets via VBA code, and I got the following error message: "Run Time Error '-2147417848 (80010108)': Automation error The object invoked had disconnected from its clients." And then Excel freezes,
and I have to close using Task Manager, End Task
- I've tried saving as .xlsx and .xlsm files
As I said, I am able to insert rows when I first initiate the file. It's only when I save it, close, it and re-open it that I cannot insert rows.
My hunch is it has to do with the range names on the worksheets causing the problems, but I guess it could be anything.
Could it be something is happening to those worksheets during the save action?
Please help.
Thanks.