Excel 2007 running .xls files from earlier version

gordon999

New Member
Joined
Mar 18, 2008
Messages
22
I have recently installed Excel 2007.
When I try to run some of my old files created under Excel 2003 then I get multiple problems normally on LARGE files with VBA code.
They all run ok on earlier versions.

The error messages are as follows:

"Run-time error '28': Out of stack space"
Some times followed by:
"Run-time error '-2147417848 (80010108) Method 'Value' of object 'Range' failed"
and usually followed by
"Microsoft Office Excel has encountered a problem and needs to close...."

under the second message the code is typically as follows (not always the same code)

Private Sub Worksheet_Change(ByVal Target As Range)

... code....

If Target.Address = "$AA$1" Then
' Show "Master"
If Range("AA1").Value = "Master" Then
Worksheets("Master").Visible = True
Exit Sub
End If

... more code...

End sub

I also find that if the file is saved under Excel 2007 and then re-opened in Excel 2003 the errors do occur.

Any idea what can cause this.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Hi there, can you post all of your code?

Also, try opening with macros disabled (holding the shift key upon opening), copying everything to a new workbook of 2007 format, saving, closing, re-opening and trying again. Also, opening excel in safe mode can be done by holding the ctrl key when opening. You can try the same thing with that instead. See if you can get it in a fresh file and see if your errors return. Would still be nice to see all of your code to see what's trying to go on here.
 
Upvote 0
Zack,

The application is VERY large, so not possible to post all of the code.

It still hangs when I open with macros disabled, seems as if it hangs BEFORE any code is invoked.

I will try (if I can open the file without it hanging) to copy all to a new 2007 workbook, but not so easy as MANY worksheets with lots of formatting.

Thanks.
 
Upvote 0
Have you tried opening this file on another machine? Did you try both methods I explained? How about both at the same time? Opening the Excel application in Safe Mode, then the file w/ Macros Disabled? The file may be corrupt. Try going back to the last version you saved with (you are creating backups of your data, right? especially LARGE files?). You may want to look at some recovery tools. Here is a popular one (http://www.datanumen.com/aer/).
 
Upvote 0
Zack,

Thanks for your advice.

I tried most things you suggested, including copying the worksheets and coding to a new book.

After lots of trials I traced it down to a coding error which went into an endless loop in Excel 2007, but not for some reason in Excel 2003.

The errors thrown up by Excel 2007 somehow corrupted the file, stripping worksheet names, and resulted in Excel terminating.

All now seems fine, and once again thanks for your help.:)
 
Upvote 0
Glad you got it sorted.

I would be curious as to the offending line(s) of code though.. if you were able to track them down. And thanks for posting your found solution!!
 
Upvote 0

Forum statistics

Threads
1,214,830
Messages
6,121,839
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top