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
 
Back
Top