View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
DaveO[_2_] DaveO[_2_] is offline
external usenet poster
 
Posts: 46
Default Code to find data validation in a cell

Futzed with it some more, and this code will do it:

Sub Find_Validation()
Dim rCell As Range
On Error Resume Next
For Each rCell In ActiveSheet.UsedRange
If rCell.Validation.Type = xlValidateList _
Then MsgBox rCell.Validation.Formula1

Next rCell

End Sub

.... but is there a more direct or "elegant" way? The On Error Resume
Next seems like a cheap fix.