G
Guest
Hi,
I am able to add a button in an excel worksheet cell in C# code. Now I want
to handle its click event in the C# itself.
Here is the code I have tried:
Excel.Buttons buttons = activeSheet.Buttons(System.Reflection.Missing.Value)
as Excel.Buttons;
Excel.Button button = null;
button = buttons.Add(5, 5, 100, 20);
button.Caption = "Trend Chart";
Now, there is one property of button class named ".OnAction". I guess we can
only define the macro name in this.
Kindly let me know how to handle its click event in C# instead of calling
macro?
Thanks,
Sunil
I am able to add a button in an excel worksheet cell in C# code. Now I want
to handle its click event in the C# itself.
Here is the code I have tried:
Excel.Buttons buttons = activeSheet.Buttons(System.Reflection.Missing.Value)
as Excel.Buttons;
Excel.Button button = null;
button = buttons.Add(5, 5, 100, 20);
button.Caption = "Trend Chart";
Now, there is one property of button class named ".OnAction". I guess we can
only define the macro name in this.
Kindly let me know how to handle its click event in C# instead of calling
macro?
Thanks,
Sunil