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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top