View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Testing for Cell Validation

Dim cell as Range
set cell = Range("B9")
If not intersect(Cell, Cells.SpecialCells(xlCellTypeAllValidation)) is
nothing then
msgbox Cell.Address & " contains data validation"
Else
msgbox cCell.Addres & " does not contain data validation"
End if

--
Regards,
Tom Ogilvy


"djrforb" wrote in message
...

For a newby to VBA programing; anyone know a neat way of testing in VBA
if a cell has data validation turned on.

Have only been able to test with an error trap on Validation.Type


Duncan


--
djrforb
------------------------------------------------------------------------
djrforb's Profile:

http://www.excelforum.com/member.php...o&userid=14863
View this thread: http://www.excelforum.com/showthread...hreadid=264928