Re: Listbox scroll problem
- From: "Steve Gerrard" <mynamehere@xxxxxxxxxxx>
- Date: Sat, 5 May 2007 12:18:11 -0700
"Rick Rothstein (MVP - VB)" <rickNOSPAMnews@xxxxxxxxxxxxxxxxx> wrote in message
news:e4hTug0jHHA.504@xxxxxxxxxxxxxxxxxxxxxxx
I have a listbox which has items added to it progressively as user entry
progresses. Whenever it is full, the scroll bar appears as expected. However,
I have to operate the scroll bar to read the latest entry. How can I arrange
things so that the last entries are always showing, ie the early entries
disappear off the top (and can be brought back by scrolling if inspection is
needed)?
Whenever you want to place the selection on the last item of the ListBox,
simply execute this code...
List1.ListIndex = List1.ListCount - 1
Rick
Another way, if used right after adding an item, is to use the NewIndex
property:
List1.AddItem "sample item"
List1.ListIndex = List1.NewIndex
.
- Follow-Ups:
- Re: Listbox scroll problem
- From: Rick Rothstein \(MVP - VB\)
- Re: Listbox scroll problem
- References:
- Listbox scroll problem
- From: Gingre
- Re: Listbox scroll problem
- From: Rick Rothstein \(MVP - VB\)
- Listbox scroll problem
- Prev by Date: Re: Any REAL reason to use ADO vs. DAO?
- Next by Date: Re: Listbox scroll problem
- Previous by thread: Re: Listbox scroll problem
- Next by thread: Re: Listbox scroll problem
- Index(es):
Relevant Pages
|