Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default C# IMdcCheckBox.Value problem

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Colon at the end of excel file name(ex: problem.xls:1, problem.xls financeguy New Users to Excel 2 January 15th 10 01:15 AM
Started out as an Access problem. Now an Excel problem RobertM Excel Discussion (Misc queries) 2 April 26th 06 07:30 PM
problem with a conditional max problem Brian Cornejo Excel Discussion (Misc queries) 1 February 18th 05 06:25 PM


All times are GMT +1. The time now is 08:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"