title: How to separate CustomUI tags in Excel-DNA from OnAction methods?
body: <p>In my .dna file I have:</p>
  
  <pre><code>&lt;DnaLibrary Name="First Add-In" RuntimeVersion="v4.0" Language="C#"&gt;
    &lt;ExternalLibrary Path="MyLibrary.dll" Pack="true"/&gt;  
    &lt;Image Name="M" Path="M.png" Pack="true" /&gt;
    &lt;CustomUI&gt;
      &lt;customUI xmlns='http://schemas.microsoft.com/office/2009/07/customui' loadImage='LoadImage'&gt;
        &lt;ribbon&gt;
          &lt;tabs&gt;
            &lt;tab id='CustomTab' label='My 2010 Tab'&gt;
              &lt;group id='SampleGroup' label='My Sample Group'&gt;
                &lt;button id='Button1' label='My Second Button' image='M' size='normal' onAction='RunTagMacro' tag='ReformatSelection='/&gt;
              &lt;/group &gt;
            &lt;/tab&gt;
          &lt;/tabs&gt;
        &lt;/ribbon&gt;
      &lt;/customUI&gt;
    &lt;/CustomUI&gt;  
  &lt;/DnaLibrary&gt;
  </code></pre>
  
  <p>In my .cs file I have:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using ExcelDna.Integration;
  using System.Runtime.InteropServices;
  using ExcelDna.Integration.CustomUI;
  using System.Windows.Forms;
  
  namespace MyLibrary
  {
      [ComVisible(true)]
      public class Class1 : ExcelRibbon
      {                
  
          public void ReformatSelection(IRibbonControl control)
          {
              MessageBox.Show("Hello");
          } 
      }
  }
  </code></pre>
  
  <p>When I load the addin the button and tab appears fine in the Ribbon, but clicking the button does not run the ReformatSelection method. In the example files provided with Excel-DNA all the subs and functions that are hooked to the onAction events are in the .dna file. I am trying to move them out of the .dna file and into the .cs file. What am I doing wrong?</p>