Data Validation question

G

Guest

Hello,

In Excel you can select "Data" then "Validation" & then set data validation
on Cells.

I was looking at the VBA Validation Object seeing how to progromatically
Add, Delete, or Modify Data Validation.

But what I want to know is, is their a way through VBA code to tell if a
Cell has Data Validation on it or not, bsaically returns True or False.

For for example if I select Cells(1,1).select, is their Data Validation on
it ?

Any help would be greatly appreciated.

Thank you,
Jeff
 
S

STEVE BELL

This worked in Excel 2000

Dim x
On Error GoTo errorhandler
x = Range("E1").Validation.Type = 1
MsgBox "yes"
Exit Sub

errorhandler:
On Error GoTo 0

MsgBox "no"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top