title: Excel/RibbonUI menu disabled
body: <p><strong>Note</strong> The following problem was solved by creating a new workbook copying all the data, macros and other code across. Any insight into what causes a workbook to "break" would be welcome!</p>
  
  <p>I have an excel file with a custom ribbonui. I've recently added a new group with a new menu, it (was) copied from the first group and certain items were removed.</p>
  
  <p>The first group "library" and all its controls work as expected. The "documentmenu" menu in the "document" group however is grayed out and I cannot figure out why!</p>
  
  <p>I've tried adding in a <code>getEnabled</code> and plain <code>enabled</code> attribute to the menu but it wont fire, neither will any of the <code>getEnabled</code> events for the menu's contained buttons.</p>
  
  <p>When I open the ribbon for the first time the <code>getLabel</code> event does fire and sets the label correctly.</p>
  
  <p>I've tried re-naming the group and all the controls to something without "document" in-case it's conflicting somehow, but again no go.</p>
  
  <p>Does anyone know what might be causing this to happen?</p>
  
  <p>Below is the entire customui xml file.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
  &lt;customUI 
      onLoad="CustomUI.Ribbon_onLoad" 
      xmlns="http://schemas.microsoft.com/office/2009/07/customui"&gt;
    &lt;ribbon&gt;
      &lt;tabs&gt;
        &lt;tab 
            id="Main" 
            label="Initech"&gt;
          &lt;group
              id="Library"
              label="Library"
              tag="Library"
              centerVertically="true"&gt;
            &lt;menu
                id="LibraryMenu"
                tag="Library"
                image="gear"
                getLabel="CustomUI.Menu_getLabel"&gt;
              &lt;button
                  id="LibraryMenu_Open"
                  tag="Library"
                  label="Open Library"
                  imageMso="FileOpen"
                  getEnabled="CustomUI.Button_getEnabled"
                  onAction="CustomUI.Button_onAction" /&gt;
              &lt;button
                  id="LibraryMenu_New"
                  tag="Library"
                  label="New Library"
                  imageMso="FileNew"
                  getEnabled="CustomUI.Button_getEnabled"
                  onAction="CustomUI.Button_onAction" /&gt;
              &lt;menuSeparator
                  id="LibraryMenu_Separator0" /&gt;
              &lt;button
                  id="LibraryMenu_Save"
                  tag="Library"
                  label="Save"
                  imageMso="FileSave"
                  getEnabled="CustomUI.Button_getEnabled"
                  onAction="CustomUI.Button_onAction" /&gt;
              &lt;button
                  id="LibraryMenu_Close"
                  tag="Library"
                  label="Close"
                  imageMso="FileClose"
                  getEnabled="CustomUI.Button_getEnabled"
                  onAction="CustomUI.Button_onAction" /&gt;
              &lt;button
                  id="LibraryMenu_Default"
                  tag="Library"
                  label="Set as Default"
                  imageMso="AcceptInvitation"
                  getEnabled="CustomUI.Button_getEnabled"
                  onAction="CustomUI.Button_onAction" /&gt;
              &lt;menuSeparator
                  id="LibraryMenu_Separator1" /&gt;
              &lt;button
                  id="LibraryMenu_Add"
                  tag="Library"
                  label="Add Component"
                  getEnabled="CustomUI.Button_getEnabled"
                  onAction="CustomUI.Button_onAction" /&gt;
              &lt;button
                  id="LibraryMenu_Editor"
                  tag="Library"
                  label="Edit Menu"
                  getEnabled="CustomUI.Button_getEnabled"
                  onAction="CustomUI.Button_onAction" /&gt;
            &lt;/menu&gt;
            &lt;dynamicMenu
                id="LibraryComponents"
                tag="Library"
                image="book_stack"
                getLabel="CustomUI.Menu_getLabel"
                getEnabled="CustomUI.Menu_getEnabled"
                getContent="CustomUI.Menu_getContent" /&gt;
          &lt;/group&gt;
          &lt;group
              id="Document"
              label="Document"
              tag="Document"
              centerVertically="true"&gt;
            &lt;menu
                id="DocumentMenu"
                tag="Document"
                imageMso="FileOpen"
                getLabel="CustomUI.Menu_getLabel"&gt;
              &lt;button
                  id="DocumentMenu_Open"
                  tag="Document"
                  label="Open Document"
                  imageMso="FileOpen"
                  getEnabled="CustomUI.Button_getEnabled"
                  onAction="CustomUI.Button_onAction" /&gt;
              &lt;button
                  id="DocumentMenu_New"
                  tag="Document"
                  label="New Document"
                  imageMso="FileNew"
                  getEnabled="CustomUI.Button_getEnabled"
                  onAction="CustomUI.Button_onAction" /&gt;
              &lt;menuSeparator
                  id="DocumentMenu_Separator0" /&gt;
              &lt;button
                  id="DocumentMenu_Save"
                  tag="Document"
                  label="Save"
                  imageMso="FileSave"
                  getEnabled="CustomUI.Button_getEnabled"
                  onAction="CustomUI.Button_onAction" /&gt;
              &lt;button
                  id="DocumentMenu_Close"
                  tag="Document"
                  label="Close"
                  imageMso="FileClose"
                  getEnabled="CustomUI.Button_getEnabled"
                  onAction="CustomUI.Button_onAction" /&gt;
            &lt;/menu&gt;
          &lt;/group&gt;
        &lt;/tab&gt;
      &lt;/tabs&gt;
    &lt;/ribbon&gt;
  &lt;/customUI&gt;
  </code></pre>
  
  <p><strong>Update</strong> after hours of playing about trying to figure out whats going on, turns out my workbook is damaged some how. The code works fine if I put it into a new workbook.</p>