How do I check if a cell has a dropdown
Hi Peter T,
Thanks for the code, it worked great.
Appreciate the help
"Peter T" wrote:
Sub test()
Dim nValType As Long
Dim rng As Range, cel As Range
Set rng = Selection
On Error Resume Next
For Each cel In rng
nValType = 0
nValType = cel.Validation.Type ' error if not validation
If nValType = 0 Then
' no validation
ElseIf nValType = xlValidateList Then
' dropdown list
Else
' some other validation
End If
Next
End Sub
Regards,
Peter T
"Givnik" wrote in message
...
I am validating a spreadsheet checking a range of cells and need to
validate
that all the cells in the range has a dropdown associated with it. Any
ideas
what the code is to do this.....
|