Call excel DNA Addin function On button Click event in excel

Jun 30, 2014 at 7:43 AM
Hi !,
I want to call a function add(a,b) (created with c# ), in excel sheet with button click event in excel without using any VBA. I want it in C#.

How can I do it?
or Any other options to do?

Jun 30, 2014 at 9:01 PM
You can create a macro with Excel-DNA like this:
public static void DoMyStuff()
And then call it from a button on the sheet by inserting a 'Form Control' and assigning "DoMyStuff" to the macro.

Jul 4, 2014 at 8:17 AM
Thank You ! :)
Dec 11, 2014 at 1:17 AM
Hi Govert and Rushikesh1717! If You can please share the sample for VS for this thing!
Thank You!