Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I am trying to create a data validation drop down. To a named range. Range(strRange).Select Range(strRange).Validation.Delete Range(strRange).Validation.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="=" & strNamedRange However the named range has not yet been created. Is there a way to assign the data validation. Then later create the range. and fill the range. then somehow do an update to the validation? thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No, the DV creation fails if the name range doesn't exist.
But you could temporarily create it and point it at the DV cell Range(strRange).Select Range(strRange).Name = strNamedRange Range(strRange).Validation.Delete Range(strRange).Validation.Add Type:=xlValidateList, _ AlertStyle:=xlValidAlertStop, _ Operator:=xlBetween, _ Formula1:="=" & strNamedRange ThisWorkbook.Names(strNamedRange).Delete -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "greg" wrote in message ... Hello, I am trying to create a data validation drop down. To a named range. Range(strRange).Select Range(strRange).Validation.Delete Range(strRange).Validation.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="=" & strNamedRange However the named range has not yet been created. Is there a way to assign the data validation. Then later create the range. and fill the range. then somehow do an update to the validation? thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
data validation using named range from another file | Excel Worksheet Functions | |||
Dynamic Named Range inside a Data Validation list ? | Excel Programming | |||
Using a data validation list to look up a defined named range in another worksheet | Charts and Charting in Excel | |||
Data validation named range update | Excel Programming | |||
Data validation named range update | Excel Discussion (Misc queries) |