One of the machines a program of mine runs on is still NT4 and Office 97. It seemed to keep working okay when I was on Win2K/Office 2000, but now I’m on WinXP/Office 2003 it’s crashing when calling the Excel object library to open an XLS.
MS have documented that this can happen after re-compiling with the Office 2000 libraries or later (though I’m sure it didn’t happen with Excel 2000).
“This behavior is by design.” Application errors by design. Yeah. SURE.
Apparently the solution is to use that normally-considered-evil late-binding; DIMming as an Object and using CreateObject.
But it didn’t seem to work for me. So I dug out an old copy of Office 97, installed it into a separate directory to Office 2003. Removed the reference to Excel 11, added Excel 8 instead (EXCEL8.OLB), recompiled and all is well.
This is unbelievable. We just came to this problem at work.
It seems that yes, the only way is to have an older “office library” collection, so to be able to see all the references in the VB references panel.
That’s quite annoying, BTW.
Ops, please correct, with “office library” collection I mean an older, parallel, Office installation, as you stated on the “rant” 😉