View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jim at Eagle Jim at Eagle is offline
external usenet poster
 
Posts: 83
Default from menu Data-Validation, with List

Guess what happens when the mouse runs away.
I think were both using the same oar

"Patrick Molloy" wrote:

lists generally show the selected item -- if you clear the cell, the the kist
will show the items top-down
You can use the selection change event to clear the cell.
In this example, cell B6 is data validated. When I select it, the event
fires, clearing the cell's value, making the list start from the first item

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$B$7" Then
Target.Value = ""
End If
End Sub

The following code is similar, but instead of clearing the cell, sets its
value to the first item in the list (range named 'MyList')- a default value
if you will:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim cell As Range
If Target.Address = "$B$7" Then
Set cell =
ActiveWorkbook.Names.Item("MyList").RefersToRange. Range("A1")
Target.Value = cell.Value
End If
End Sub


"Jim at Eagle" wrote:

Is there a way when cell selected with small arrow button that the list range
will allways show from the top of list range and not from last selection
within the list range
-
Jim at Eagle