Listbox select first on list

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two listboxes, one that lists courses and one that lists classes of
that course. how do I get the second listbox to highlight or select the
first (or last) class? The rest of my form won't update until you select
something on that list.

Many thanks in advance. This is a terrific resource and I am genuinely
grateful for the help.
 
In this example, the class listbox is called lstClass.
To select the first item use the code lstClass.Selected(0) = True
To select the last item use the code lstClass.Selected(lstClass.ListCount
-1) = True
 

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

Back
Top