This project has moved and is read-only. For the latest updates, please go here.

How to create a button in Excel with Netoffice

Nov 5, 2014 at 1:19 PM

Is it possible to create a button Excel which execute a code from .NET ? Currently, I know how to create a ribbon thanks to examples but there are no example which done my need..

I know that create a button is possible with :
Excel.Shape refresh = workSheetGroupingTest.Shapes.AddFormControl(XlFormControl.xlButtonControl, 3, 3, 100, 18);
but how can i write a code which will be execute when the button will be clicked ?

Thanks for your job,

Nov 6, 2014 at 4:46 PM
The code I posted here works for me. Note: The code uses ActiveX and not form buttons.
Nov 14, 2014 at 10:28 AM
That works fine ! Thank you