Set Validation list to show top item

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
 
B

Bob Phillips

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)
 
A

Anders Silven

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
 
T

Tod

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



.
 
Top