LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 219
Default What happens to data validation when created from VBA?

I've been working with data validation on a spreadsheet project I've been
doing. It seems that if I put custom/complex data validation criteria into
the Custom Formula field directly, they work fine. But when I put them in
using VBA, they no longer work properly - the won't validate correct data.

I've done this with a number of different formulas. E.g., the formula

=MONTH(H7)=MONTH(I7)

works fine entered by VBA. But, the formula

=and((I7H7),month(I7)=month(H7),year(I7)=year(H7) ,i7(month(G7),day(G7),year(G7)+21))

doesn't. It won't validate an entry that meets all these criteria.

I've done a fair amount of research online (as well as looking through my
various XL manuals) and haven't found an answer. I've used formulas that I
found online to see if it's just my formulas, and it's not.

So what's going on here? Is there a trick to entering formulae as
validation criteria via VBA that I'm missing?

I'm using XL2003. Thanks for the help.
 
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
custom data validation on cells with data validation values AKrobbins Excel Worksheet Functions 2 June 21st 11 04:20 PM
Data Validation List created from a text in a Cell [email protected] Excel Worksheet Functions 12 September 17th 07 02:36 AM
Validation function that created from another drop down list Jamie Excel Discussion (Misc queries) 2 May 9th 06 12:56 AM
Validation-List created with VBA falstaff[_2_] Excel Programming 1 September 20th 04 02:05 PM
Validation-List created with VBA falstaff Excel Programming 1 September 20th 04 01:43 PM


All times are GMT +1. The time now is 04:55 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"