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: 25
Default change data validation

I have data validation (allows values in a list) set in column A (except for
A1:A5). I want to change the validation list dynamically because the values
i'm interested in will change as a query is refreshed. I've tried creating a
string variable that captures the range (set myRange = Range(("AB2"),
Selection.End(xlDown))) and using that to modify the validation:

Range("A:A").Validation.Modify xlValidateList, xlValidAlertStop, , crsRange

but i get this error - "Application-defined or object-defined error".

I get the same error if i try to create myRange as a string variable, too.
The range i want to use for the validation list will change each time a
person uses the file, so i need to get this to work.

Any advice?

Thanks

 
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
Can I Change Displayed Data Through Data Validation? TEK Excel Discussion (Misc queries) 2 May 15th 09 12:25 PM
change the data validation to 'any value if 'other' is selected barry j Excel Discussion (Misc queries) 0 April 30th 09 06:54 PM
How does Data Validation change with a formula change? MayClarkOriginals Excel Worksheet Functions 3 July 5th 06 04:50 AM
Add/Change Data validation list ex1302[_7_] Excel Programming 0 July 20th 05 11:08 AM
Data Validation & ControlSource & Change event Ocker Excel Programming 4 November 5th 04 03:34 AM


All times are GMT +1. The time now is 07:52 AM.

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"