Set Validation list to show top item

  • Thread starter Thread starter Tod
  • Start date Start date
T

Tod

I have a Data Validation List. Users can choose an item
from the list and have it show the value they have chosen.
I'm trying to write code that will reset the values on the
worksheet. For the validation list I'd like for it to
reset the cell to show the top item in the list.

For example, if the list is:

Select One
Dog
Cat
Rat
Snake

The user has chosen 'Rat' for the value. I want my code to
reset the cell to show 'Select One' as the value.

tod
 
Range("C1").Value ="Dog"

assuming that the DV is in C1. The cell is just a cell, so you can
overwrite the value

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
One way,

If you name the validation list, for example ValList, you can do
range("M17").Value = range("ValList").Cells(1)
where M17 is the input cell with Data Validation (and validation is =ValList).

HTH
Anders Silven
 
That worked for me. Thanx.
-----Original Message-----
One way,

If you name the validation list, for example ValList, you can do
range("M17").Value = range("ValList").Cells(1)
where M17 is the input cell with Data Validation (and validation is =ValList).

HTH
Anders Silven



.
 

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

Back
Top