Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default make use of cell defined data validation in vba

In vba, is there a way to exercise/engage the validation already
defined in a cell?? I have cells that have defined data rules but I
seem to be able to set cell values, in vba, to anything I please with
no error generated.

Thank you
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 173
Default make use of cell defined data validation in vba

Cate,

Try Range("A1").Validation.Value. From the help file:

"Returns a Boolean value that indicates if all the validation criteria are met (that is, if the range contains valid data)."

Thus, you could use the above property to check whether your changes are valid. If you capture the formula/value in a given range prior to making changes, then you could revert back to this original formula/value in the event that your code generates invalid data.

Ben

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
make cell equal a word if a data validation cell has a word in it Robzz Excel Discussion (Misc queries) 1 February 6th 09 06:20 PM
Data Validation via Dependent List defined by Dynamic Range Lee4 Excel Discussion (Misc queries) 3 August 20th 08 04:45 PM
How to make an external link to a filename defined by a cell value AndreCanelas Links and Linking in Excel 3 May 17th 06 11:38 PM
Data Validation with Defined Name Sige Excel Worksheet Functions 3 January 13th 06 11:04 PM
Using a data validation list to look up a defined named range in another worksheet Laura Hunt Charts and Charting in Excel 0 November 24th 05 02:29 PM


All times are GMT +1. The time now is 11:57 PM.

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

About Us

"It's about Microsoft Excel"