List Box Scroll to Bottom After Add

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

Guest

Greetings.

I have an event timing application where I take a time stamp for each
participant that crosses the finish line and then add that time stamp to
a table that is used as a row source for my list box (titled PlaceList).

Unfortunately, after a certain number of additions, any new times I
add show up below the visible portion of the list box. I need some
way of either scrolling down or selecting the bottom row of the box after
every addition.
 
In the code that adds the data to the listbox, add this step (replace my
generic names with the real names):

Me.ListBoxName.Value = Me.ListBoxName.ItemData(Me.ListBoxName.ListCount +
Me.ListBoxName.ColumnHeads - 1)
 
Thanks. This worked.

Ken Snell (MVP) said:
In the code that adds the data to the listbox, add this step (replace my
generic names with the real names):

Me.ListBoxName.Value = Me.ListBoxName.ItemData(Me.ListBoxName.ListCount +
Me.ListBoxName.ColumnHeads - 1)
 
Back
Top