Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Visual Basic only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
Visual Basic
Vb6 Listbox scroll to last entry
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
Wernerh
New Member
Join Date:
Jul 2007
Posts:
104
#1
Vb6 Listbox scroll to last entry
Feb 11 '08, 10:29 AM
Hi, I have created a log in a listbox to show users everytime someone has logged on. Is there a form load function that will scroll down the listbox to the last entry each time the form is loaded??
Thanks
debasisdas
Recognized Expert
Expert
Join Date:
Dec 2006
Posts:
8119
#2
Feb 11 '08, 10:49 AM
Have you tried to set the listindex =listcount-1 ?
Comment
Post
Cancel
Wernerh
New Member
Join Date:
Jul 2007
Posts:
104
#3
Feb 11 '08, 11:02 AM
Originally posted by
debasisdas
Have you tried to set the listindex =listcount-1 ?
Hi just tried this code :
List2.ListIndex = ListCount - 1
No luck unfortunately
Comment
Post
Cancel
debasisdas
Recognized Expert
Expert
Join Date:
Dec 2006
Posts:
8119
#4
Feb 11 '08, 11:13 AM
Use this
[code=vb]
List1.ListIndex = List1.ListCount - 1
[/code]
Comment
Post
Cancel
Wernerh
New Member
Join Date:
Jul 2007
Posts:
104
#5
Feb 11 '08, 11:20 AM
Originally posted by
debasisdas
Use this
[code=vb]
List1.ListIndex = List1.ListCount - 1
[/code]
Thank you so much for your help - it now works
Comment
Post
Cancel
devonknows
New Member
Join Date:
Nov 2006
Posts:
137
#6
Feb 11 '08, 12:01 PM
Originally posted by
debasisdas
Use this
[code=vb]
List1.ListIndex = List1.ListCount - 1
[/code]
If i may, Just adding alittle error checking on that
[code=vb]
If List1.Listcount > 0 then List1.Listindex = List1.Listcount - 1
[/code]
Stop any errors being triggered on the unlikely event that the Listbox is cleared, or items are removed.
Kind Regards
Devon
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment