ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Data Validation question (https://www.excelbanter.com/excel-programming/331778-data-validation-question.html)

Jeff

Data Validation question
 
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


STEVE BELL

Data Validation question
 
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"


--
steveB

Remove "AYN" from email to respond
"Jeff" wrote in message
...
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





All times are GMT +1. The time now is 12:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com