title: How to add a menu item to Excel 2010 Cell Context Menu - old code doesn't work
body: <p>I've tried 3 different code samples and they all fail. </p>
  
  <p>Here's the code from a MSFT employee (<a href="http://social.msdn.microsoft.com/Forums/en-IE/exceldev/thread/b4e953a1-e733-49eb-90fc-87e7d16e9dd4?prof=required" rel="nofollow noreferrer">How to show a context menu on a range</a>), the other two samples have pretty much the exact same code:</p>
  
  <pre><code>private void ThisAddIn_Startup(object sender, System.EventArgs e)
  {
      CommandBar cellbar = this.Application.CommandBars["Cell"];
      CommandBarButton button = (CommandBarButton) cellbar.FindControl(MsoControlType.msoControlButton, 0, "MYRIGHTCLICKMENU", Missing.Value, Missing.Value);
      if (button == null)
      {
          // add the button
          button = (CommandBarButton) cellbar.Controls.Add(MsoControlType.msoControlButton, Missing.Value, Missing.Value, cellbar.Controls.Count, true);
          button.Caption = "Refresh";
          button.BeginGroup = true;
          button.Tag = "MYRIGHTCLICKMENU";
          button.Click += new _CommandBarButtonEvents_ClickEventHandler(MyButton_Click);
      }
  }
  
  private void MyButton_Click(CommandBarButton cmdBarbutton, ref bool cancel)
  {
      System.Windows.Forms.MessageBox.Show("MyButton was Clicked", "MyCOMAddin");
  }
  </code></pre>
  
  <p><strong>I'm expecting to see a menu item called Refresh when right clicking on a cell. Yet running the above code (in Excel 2010) there is no 'Refresh' menu item.</strong> </p>
  
  <p>What might I be missing, or did this functionality change from 2007 to 2010?</p>