Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I created a button, to dynamically create a validation on cell
the following is the code i wrote: ...... Excel.Range thisRange = ((Excel.Worksheet)(this.thisWorkbook.Worksheets.ge t_Item("XXXXX"))).get_Range("A1", Type.Missing); thisRange.Validation.Add(Excel.XlDVType.xlValidate List, Excel.XlDVAlertStyle.xlValidAlertStop, Excel.XlFormatConditionOperator.xlBetween,"Yes, No", Type.Missing); ...... I tested, and found that thisRange is not null and thisRange.Validation is not null either. However, when i wrong the code, and clicked the button, it tells me "Object Reference is Not set to an instance of an object". But the range object is not, while validation is not null either. Can anyone help me solve this problem? Many thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
New Excel development | Excel Discussion (Misc queries) | |||
Development tool,Excel,GUI | Excel Discussion (Misc queries) | |||
Form development question | Excel Programming | |||
A development of a Macro by Tom | Excel Programming | |||
EXCEL MACRO DEVELOPMENT | Excel Programming |