View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Umlas, Excel MVP Bob Umlas, Excel MVP is offline
external usenet poster
 
Posts: 320
Default Validate if cell use data validation

Function ActiveCellUsesDV(Rg As String)
ActiveCellUsesDV = Not
Application.Intersect(Cells.SpecialCells(xlCellTyp eAllValidation), Range(Rg))
Is Nothing
End Function

Then you can use something like
If ActivecellUsesDV("H11") then...
etc.
HTH

"Pascal.Landry" wrote:

Hi there,

Does anyone know how I can validate if a cell is using datavalidation using.
I mean using VBA and not by opening the Data validation menu...

It seams that whenever there is no validation, the value of all parameters
are not set. I've tried to use isnull, isempty... nothing worked...

Thanks for your help !