Hello,
I'm currently considering to rewrite an Excel 2003 workbook that has VBA code in it to VSTO.
This workbook contains multiple sheets. Each site has a visible button at the top of sheet. When the user clicks the button, it uses the data from some named cells as a parameter to retrieve data from a database and populate several tables.
The users make copy of previous sheets of the workbook when they need to create a new one. It is monthly sales summary so each month has its own sheet/tab.
I've tried to reproduce this approach in VSTO. It works fine for the sheet for which I placed the button on at design-time, but when in Excel, if I try to copy that sheet to a new one, the button stops working (gets a replaced by its bitmap representation).
The problem seems to be that Excel/VSTO does not understand that the new sheet should be "code-enabled".
Is there an easy and user-friendly approach to this, or I am stuck using VBA, which works fine... but I would much prefer using the .net framework, and especially ADO.Net to replace these spreadsheets and the new developments.
Thanks a lot in advance.