Disabled Items

I had a strange one last week while assisting a user reported problem.

I’ve got a workbook and a VBA referenced XLA.
The workbook loaded fine, but produced errors when you tried to execute macros.
The debug point was on the “Left” function, which is a classic symptom of a broken reference.

Checking the VBA Project, I noticed that the referenced XLA was not loaded at all, even though it was referenced.
The XLA was in the right spot. Security and permissions were OK.
No matter how many times I closed and re-opened Excel, it still would not load that referenced XLA.
I even tried rebooting the computer.

It turns out that the user had suffered a “serious crash” just hours earlier. The next time he started Excel is came up with all sorts of recovery questions, which went something like ‘this workbook suffered a serious crash, are you sure you want to open it?’.
Excel does this for all the suspect workbooks – even referenced XLAs – except that with referenced XLAs, that question is not presented to the user, it just assumes ‘no, you dont want to open this corrupt workbook’ (though it wasn’t corrupt at all).

The fix:
I opened the XLA file by itself, answered the recovery question and all was good next time Excel ran.

That’s not the only way to do it though.
It turns out that Excel maintains a list of Disabled Items that you can enable by going into Excel’s menu:
Help > About Excel > Disabled Items…
Then highlight the items and click Enable.

A fairly strange place to manage disabled items. I guess since it’s an Office-wide feature they might have struggled for UI consistency – who knows?

I spent some time trying to simulate a crash, but couldn’t. It must have been pretty serious!

Posted in Uncategorized

11 thoughts on “Disabled Items

  1. I suspect the serious crash was more to do with network conditions (network share unavailable) than with the Excel.exe process.

    Disabled Items are for versions of Excel (office?) 2002+

    I also believe there are registry settings that control the logic behind Disabled Items.

  2. Yep Had the same problem when loading an XLL (cwbtfxla). It is one of the the itmes that appears in the disabled item list. Never knew it existed till I saw this post.

    Any way of knowing what is the problem in the XLL ??…. Any way of converting the XLL in to an XLA file ?

  3. “Never knew it existed till I saw this post”
    Me too – what a very strange place to put it, very odd indeed!

    I currently have a problem with opening files in to excel, the rest of office is ok. I have tried every thing i know, but excel just wont open with a doubble click, i have to get them through the file menu or by draging them in. Open with, doesn’t do it – I’ve even reinstalled office, but no joy. Strange.

    You can’t convert a Xll to an XLA, they are infact written if diffrent languages.

    Good spot Rob!

  4. Simon,
    Thanks for the thread…. the internet always reminds me that I did not invent anything…. not even a problem :-)

  5. “Ross
    check ignore other applications is not ticked in tools>>options>>general”

    God! I’m so embarrassed. It fixed my problem!

    But i thought irnore other apps would just open a new application object and open it into that? and why didn;t it reset when i ran Dectect and repair!

    Anyway thanks Simon, One to keep my eye on for the future!

  6. Has anyone figured out whether Excel logs the event when it disables something?

    I have one customer who has had this happen with my add-in several times. I have fairly comprehensive error logging throughout my application, and yet no errors were written to the log. It would be nice if I could track down the cause, but without any logging I’m stumped.

  7. Can someone suggest any way (through vba/.net) to list the files in disabled items? I have this issue for a big addin. I am planning to create a new addin for checking dependencies and also if this addin is not added in disabled items by excel. Thanks

  8. I had also the same problem. But I want to know when Excel Application disabled any AddIn? I know that bcoz of some serious crash these is hapening but I want to know which type of Crash.???

Posting code? Use <pre> tags for VBA and <code> tags for inline.

Leave a Reply

Your email address will not be published.