Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to check whether Cell has Validation?
Hello -
I am trying to do a very simple thing: I would like to know whether a certain cell has a List Validation (i.e. dropdown) turned on. I get the lSheet.Range().Validation but how does this tell me whether there is a dropdown validation? I cannot check eny of the fields without getting an error if there is none defined? I tried lSheet.Range().Validation.Type = xlValidateList but that does not work if there is no validation. Any ideas? Thanks, Joe |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to check whether Cell has Validation?
On Error Resume Next
dv = ActiveCell.Validation.Formula1 On Error GoTo 0 MsgBox Not IsEmpty(dv) -- --- HTH Bob (change the xxxx to gmail if mailing direct) "Joe HM" wrote in message ps.com... Hello - I am trying to do a very simple thing: I would like to know whether a certain cell has a List Validation (i.e. dropdown) turned on. I get the lSheet.Range().Validation but how does this tell me whether there is a dropdown validation? I cannot check eny of the fields without getting an error if there is none defined? I tried lSheet.Range().Validation.Type = xlValidateList but that does not work if there is no validation. Any ideas? Thanks, Joe |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to check whether Cell has Validation?
Ish ... is that the only way? Oh well ... I guess it works ... thanks!
Joe On Jan 4, 1:34 pm, "Bob Phillips" wrote: On Error Resume Next dv = ActiveCell.Validation.Formula1 On Error GoTo 0 MsgBox Not IsEmpty(dv) -- --- HTH Bob (change the xxxx to gmail if mailing direct) "Joe HM" wrote in glegroups.com... Hello - I am trying to do a very simple thing: I would like to know whether a certain cell has a List Validation (i.e. dropdown) turned on. I get the lSheet.Range().Validation but how does this tell me whether there is a dropdown validation? I cannot check eny of the fields without getting an error if there is none defined? I tried lSheet.Range().Validation.Type = xlValidateList but that does not work if there is no validation. Any ideas? Thanks, Joe- Hide quoted text -- Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Check Box and Validation of a cell | Excel Discussion (Misc queries) | |||
VB Data Validation check | Excel Discussion (Misc queries) | |||
Check validation on SelectionChange | Excel Programming | |||
Problem with validation check! | Excel Worksheet Functions | |||
Check Boxes & Data Validation | Excel Discussion (Misc queries) |