Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
tod tod is offline
external usenet poster
 
Posts: 114
Default Set Validation list to show top item

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Set Validation list to show top item

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)

"Tod" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Set Validation list to show top item

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

"Tod" skrev i meddelandet
...
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


  #4   Report Post  
Posted to microsoft.public.excel.programming
tod tod is offline
external usenet poster
 
Posts: 114
Default Set Validation list to show top item

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

"Tod" skrev i meddelandet
...
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


.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use word to associate an item in validation drop down list Otani Excel Discussion (Misc queries) 2 January 28th 10 02:40 PM
Data validation list - list doesn't show items from top Pwinkle Excel Discussion (Misc queries) 0 June 23rd 09 07:56 PM
How do I add an item with comma in the list of data validation bhavna Excel Discussion (Misc queries) 9 October 2nd 08 04:13 PM
show more items in validation list jenn Excel Worksheet Functions 1 December 11th 06 07:43 PM
Help! Selecting item on data validation list switches windows Kevlar Excel Discussion (Misc queries) 0 February 28th 06 10:35 PM


All times are GMT +1. The time now is 09:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"