PC Review


Reply
Thread Tools Rate Thread

How to bind events for formsControls inside Excel

 
 
patro
Guest
Posts: n/a
 
      18th Nov 2008
Hi,
I am developing an Excel Addin using VS2008 and VSTO3.0,On click of one of
the buttons of the ribbon it creates check boxes inside Excel.to create
checkBox i followed the following approach

Excel.Range cell = _mWorkSheet.Cells[i, 1] as Excel.Range;
Microsoft.Office.Interop.Excel.Shape shape;
// shape =
_mWorkSheet.Shapes.AddFormControl(Microsoft.Office.Interop.Excel.XlFormControl.xlDropDown,
Convert.ToInt32(cell.Left), Convert.ToInt32(cell.Top),
Convert.ToInt32(cell.Width), Convert.ToInt32(cell.Height));
shape =
_mWorkSheet.Shapes.AddFormControl(Microsoft.Office.Interop.Excel.XlFormControl.xlCheckBox,
Convert.ToInt32(cell.Left), Convert.ToInt32(cell.Top),
Convert.ToInt32(cell.Width), Convert.ToInt32(cell.Height));
shape.Name = "checkbox"+i.ToString();

Now i want to know how can i bind any event to checkboxs inside excel cell.

Thanks,
Patro
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bind Gridview from inside iFrame Dave Microsoft ASP .NET 1 9th Oct 2009 03:57 PM
Events for CheckBox inside Excel using ExcelAddIn project patro Microsoft Excel Programming 0 19th Nov 2008 09:10 AM
How to access and bind a label inside a GridView Template Field? Miguel Dias Moura Microsoft ASP .NET 1 8th Mar 2006 12:11 PM
How to use mouse events inside an Excel Sheet ? mike Microsoft Excel Programming 7 28th Jul 2004 12:23 PM
Bind listbox inside Bound datalist VbScripter Microsoft ASP .NET 0 8th Jan 2004 08:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:48 AM.