Shapes and Windows Forms Controls on Worksheet

Add-in Express™ Support Service
That's what is more important than anything else

Shapes and Windows Forms Controls on Worksheet
 
Ricardo Virtudazo


Guest


I am transitioning from VBA and trying to have something similar to adding forms controls on a worksheet and shapes with macro. How do I do that on Add-in Express?
Posted 29 Mar, 2015 06:40:56 Top
Andrei Smolin


Add-in Express team


Posts: 18791
Joined: 2006-05-11
Hello Ricardo,

These features are provide by the Excel object model. You can record a VBA macro while adding MS Forms controls and shapes onto the worksheet to learn the way you create such controls.

If you run into problems with this, please let me know.


Andrei Smolin
Add-in Express Team Leader
Posted 30 Mar, 2015 01:27:13 Top
Ricardo Virtudazo


Guest


Hi Andrei,

Thank you for your quick response. I saw your message from the other post regarding Worksheet Module. The TimeSheet sample did clarify a big chunk of working with ActiveX Controls on the worksheet. I'm still not sure how it works with Shapes. So say I add a circle on the worksheet and I need to show "Hello World" on a message box when the circle is clicked, how do I code that on Add-in Express.

And also, is it possible to add Windows Form Control (not MSForms or ActiveX) on the worksheet?

Thank you,
Ricardo
Posted 30 Mar, 2015 06:15:19 Top
Andrei Smolin


Add-in Express team


Posts: 18791
Joined: 2006-05-11
Ricardo Virtudazo writes:
And also, is it possible to add Windows Form Control (not MSForms or ActiveX) on the worksheet?


It isn't; Excel was developed long before Windows Form Control were first designed.

As to shapes, please check https://www.add-in-express.com/creating-addins-blog/2012/02/21/excel-shapes-events/.


Andrei Smolin
Add-in Express Team Leader
Posted 30 Mar, 2015 06:24:39 Top
Ricardo Virtudazo


Guest


Hi Andrei,

Thank you for the link on shapes events, will give that a shot.

Regarding Windows Form, on VSTO, i can add Windows Forms control on the worksheet for document-level customization. I understand that Add-in Express only works on application-level, but is there any workaround?

Thank you,
Ricardo
Posted 30 Mar, 2015 08:22:24 Top
Andrei Smolin


Add-in Express team


Posts: 18791
Joined: 2006-05-11
Ricardo,

I believe they have many backdoors in Office for a VSTO add-in. You cannot embed a Windows Forms control onto an Excel sheet. Embedding a control requires creating an ActiveX control which is well beyond of scope for an Add-in Express based add-in. Consider showing some controls on a custom pane; it lets you use any .NET control.


Andrei Smolin
Add-in Express Team Leader
Posted 30 Mar, 2015 08:32:03 Top
Ricardo Virtudazo


Guest


Roger that. Thank you, Andrei.
Posted 30 Mar, 2015 08:38:33 Top
Andrei Smolin


Add-in Express team


Posts: 18791
Joined: 2006-05-11
Welcome!


Andrei Smolin
Add-in Express Team Leader
Posted 30 Mar, 2015 08:44:47 Top