Setting the Validation Criteria on the fly

G

Guest

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
 
B

Bernie Deitrick

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top