views:

35

answers:

1

I am developing an Excel VSTO C# add-in. The add-in has a single command-bar ribbon with 1 command-bar-button.

the purpose of this button is to

  1. open a dialog window that allows search dates to be entered
  2. then calls off to a web-service to retrieve data, which gets populated in the spreadsheet.

The problem is that after the install of the add-in it all works as expected. however after shutting down excel, then reopening it later, the click event on the command-bar-button is no longer handled or is not firing.

The VSTO addin is installed from a network location.

+1  A: 

If your add-in targets Excel 2007, and doesn't require to be installed on Excel 2003, there is no reason to use CommandBar buttons - use the Ribbon. It will make your development easier, and will look better, too. If you already use Excel 2007 to open and work with the Excel 2003 document and this hasn't caused problems, doing the same via VSTO should not introduce problems.

There are plenty of tutorials on how to use the Ribbon; I have one post on my blog showing how to add a button to the Ribbon to trigger some action: http://www.clear-lines.com/blog/post/create-excel-2007-vsto-add-in-ribbon.aspx

Mathias
Thanks Mathias. appreciate you help.
Nathan Fisher