ASP.NET - Buttons in Excel - Asked By sachin s on 25-Jun-12 09:03 AM

Hi,

1) I have an excel sheet database kind of. I want to include buttons In excel, which should perform user specified operations like "save", "Close" etc.

2) I have also created some hyperlinks in my excel sheet.what i want is, when the user hovers the mouse on that particular link, the link has to be highlighted with some color & also it should give a dropdown list of all the available hyperlinks in that particular link...
 (Basically a drop down has to be displayed in my excel sheet as soon as the mouse is hovered over the hyperlink)

Would sme1 pls tell me how this can be achieved.

Advanced Thanks
Sachin S

Jitendra Faye replied to sachin s on 26-Jun-12 12:45 AM
If you want to add button then use this code-

Dim button As Shape

Set button = Sheets("Sheet1").Shapes.AddOLEObject("Forms.CommandButton.1", , , , , , , 1, 1, 100, 100)


and if you want to perform any functionality on that button click then refer this article-

http://blogs.msdn.com/b/vsod/archive/2009/10/02/excel-how-to-run-c-code-behind-with-a-click-of-a-button-on-a-worksheet-without-vba-code.aspx?Redirected=true