Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 921
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data validation (lis) question Patrick C. Simonds Excel Worksheet Functions 2 April 4th 09 04:44 PM
Data Validation Question Andrew Mackenzie Excel Discussion (Misc queries) 1 January 22nd 07 02:57 PM
Data Validation Question? mastermind Excel Worksheet Functions 2 December 22nd 06 05:26 PM
Data validation question Ted Rogers New Users to Excel 3 September 5th 05 12:26 AM
data validation question keepITcool Excel Programming 0 October 15th 04 11:56 PM


All times are GMT +1. The time now is 09:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"