Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Guys
Would it be possible for you to explain the method used to set an Excel checkbox in C#. The code I have developed to create and place the checkbox within the worksheet is below /**** Excel.OLEObjects OleObjectsObject = (Excel.OLEObjects)ExcelWorkSheet.OLEObjects(Type.M issing) Excel.OLEObject OleControl = OleObjectsObject.Add("Forms.CheckBox.1", Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, StartLeft, InternalStartTop, 130, 10); MSForms.CheckBox MyCheckBox MyCheckBox = (MSForms.CheckBox)base.FindControl(OleControl.Name , ExcelWorkSheet) /**** However, when trying to set the value of MyCheckBox.Value to true I am told the following "Property, indexer, or event 'Value' is not supported by the language; try directly calling accessor methods 'Microsoft.Vbe.Interop.Forms.IMdcCheckBox.get_Valu e()' or 'Microsoft.Vbe.Interop.Forms.IMdcCheckBox.set_Valu e(ref object)' This is where I am stuck.... I can't access the methods connected to this interface If you could shed some light on this problem I would appreciate the advice Regards Jim |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Colon at the end of excel file name(ex: problem.xls:1, problem.xls | New Users to Excel | |||
Started out as an Access problem. Now an Excel problem | Excel Discussion (Misc queries) | |||
problem with a conditional max problem | Excel Discussion (Misc queries) |