I am using VSTO / .NET4.0 to create an Excel addin. I would like to embed controls (buttons and comboboxes) into a worksheet. I use the code below, but once I save the workbook, close it and reopen it, the button has changed into a flat image which has no functionality. What am I doing wrong? Any help would be greatly appreciated!
System.Windows.Forms.Button b = new System.Windows.Forms.Button();
b.Text = "Run";
sheet.Controls.AddControl(b, (sheet.Cells[rowidx, colidx] as Range),"buttonName");
b.Click += this.runSimulation;