list box

W

Wavequation

I have a list box, upon whose selection determines the contents of another
list box. If there is only one value given in the second list box, I would
like it to be automatically selected... any advice?
Thanks!
 
S

Stuart McCall

Wavequation said:
I have a list box, upon whose selection determines the contents of another
list box. If there is only one value given in the second list box, I
would
like it to be automatically selected... any advice?
Thanks!

Let's call them Listbox1 and Listbox2. In Listbox1's AfterUpdate event,
include the following:

If Listbox2.ListCount = 1 Then
Listbox2 = Listbox2.ItemData(0)
End If
 
Top