Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Use word to associate an item in validation drop down list | Excel Discussion (Misc queries) | |||
Data validation list - list doesn't show items from top | Excel Discussion (Misc queries) | |||
How do I add an item with comma in the list of data validation | Excel Discussion (Misc queries) | |||
show more items in validation list | Excel Worksheet Functions | |||
Help! Selecting item on data validation list switches windows | Excel Discussion (Misc queries) |