View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Setting the Validation Criteria on the fly

Use your macro recorder to get the code for setting the Validation to a
list - it is easy to modify from there.

But note that you cannot have a list named AI810, which is a valid cell
reference - but it may work if that cell has a name of a valid named range
in it.

So, I'm a little unclear on what you are actually doing.

Bernie

"PDABACC" wrote in message
...
Help!!
I have a WorkBook with a Sheet that contains lists that are defined as
named
ranges. I am using VB within Excel to build a sheet and want to set a
cells
validation criteria from the lists.
For Example my Sheet called LISTS has a named range AI810 that has a list
of
values 0..20mA, 1..5V, 4..20mA
When I insert a sheet using VB I want to set say cell A2 to the above
validation criteria. I know if I do it by hand you use the
=indirect("LISTS!AI810") and select a List. How do u do it from within VB