title: How to create a custom ribbon tab in MS Project 2016?
body: <p>I have two VBA macros that create a custom tab in MS Project 2013. The three macros are:</p>
  
  <pre><code>Private Sub Project_Open(ByVal pj As Project)
       AddEVMRibbon
  End Sub
  
  Private Sub removeEVMRibbon()
      ribbonXml = "&lt;mso:customUI  xmlns:mso=""http://schemas.microsoft.com/office/2009/07/customui""&gt;" &amp; "&lt;mso:ribbon&gt;&lt;/mso:ribbon&gt;&lt;/mso:customUI&gt;"
      ActiveProject.SetCustomUI (ribbonXml)
  End Sub
  
  Private Sub AddEVMRibbon()
  Dim ribbonXml As String
  
      ribbonXml = "&lt;mso:customUI xmlns:mso=""http://schemas.microsoft.com/office/2009/07/customui""&gt;"
      ribbonXml = ribbonXml + "  &lt;mso:ribbon&gt;"
      ribbonXml = ribbonXml + "    &lt;mso:qat/&gt;"
      ribbonXml = ribbonXml + "    &lt;mso:tabs&gt;"
      ribbonXml = ribbonXml + "      &lt;mso:tab id=""macroTab"" label=""EVM"" insertAfterQ=""mso:TabFormat""&gt;"
      ribbonXml = ribbonXml + "        &lt;mso:group id=""testGroup"" label=""Test"" autoScale=""true""&gt;"
      ribbonXml = ribbonXml + "          &lt;mso:button id=""export_to_excel"" label=""Set EVM Calc Method"" "
      ribbonXml = ribbonXml + "imageMso=""DiagramTargetInsertClassic"" onAction=""Set_EVM_Method""/&gt;"
      ribbonXml = ribbonXml + "          &lt;mso:button id=""get_evm_method"" label=""EVM to Excel"" "
      ribbonXml = ribbonXml + "imageMso=""DiagramTargetInsertClassic"" onAction=""evm_to_excel""/&gt;"
      ribbonXml = ribbonXml + "        &lt;/mso:group&gt;"
      ribbonXml = ribbonXml + "      &lt;/mso:tab&gt;"
      ribbonXml = ribbonXml + "    &lt;/mso:tabs&gt;"
      ribbonXml = ribbonXml + "  &lt;/mso:ribbon&gt;"
      ribbonXml = ribbonXml + "&lt;/mso:customUI&gt;"
  
      ActiveProject.SetCustomUI (ribbonXml)
  
  End Sub
  </code></pre>
  
  <p>These work correctly in MS Project 2013, but today I got the opportunity to run them with MS Project 2016, and they fail, rather spectacularly. </p>
  
  <p>In both Project 2013 and 2016 the EVM Tab appears correctly and the two options, "Set EVM Method" and "EVM to Excel," appear when that custom tab is clicked. </p>
  
  <p>In Project 2013 clicking on an option executes the VBA macro associated with the option in the XML. In Project 2016 simply hovering the mouse over either of the two options causes Project to fail immediately, giving me the "Microsoft Project has stopped working" then "Microsoft Project is restarting" messages. </p>
  
  <p>I never have a chance to click the option, as it fails immediately when the cursor touches the option.</p>
  
  <p>Has something changed between Project 2013 and 2016 that would cause this custom ribbon bar tab to fail in 2016? I have not been able to find anything referring to such a change. </p>
  
  <p>Do custom tabs and their options in Project 2016 need to be coded differently than in 2013? Any and all help will be appreciated.</p>