469,073 Members | 1,791 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,073 developers. It's quick & easy.

Vb6 Listbox scroll to last entry

104 100+
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
Feb 11 '08 #1
5 11779
debasisdas
8,127 Expert 4TB
Have you tried to set the listindex =listcount-1 ?
Feb 11 '08 #2
Wernerh
104 100+
Have you tried to set the listindex =listcount-1 ?
Hi just tried this code :

List2.ListIndex = ListCount - 1

No luck unfortunately
Feb 11 '08 #3
debasisdas
8,127 Expert 4TB
Use this

Expand|Select|Wrap|Line Numbers
  1. List1.ListIndex = List1.ListCount - 1
  2.  
Feb 11 '08 #4
Wernerh
104 100+
Use this

Expand|Select|Wrap|Line Numbers
  1. List1.ListIndex = List1.ListCount - 1
  2.  
Thank you so much for your help - it now works
Feb 11 '08 #5
devonknows
137 100+
Use this

Expand|Select|Wrap|Line Numbers
  1. List1.ListIndex = List1.ListCount - 1
  2.  
If i may, Just adding alittle error checking on that

Expand|Select|Wrap|Line Numbers
  1. If List1.Listcount > 0 then List1.Listindex = List1.Listcount - 1
  2.  
Stop any errors being triggered on the unlikely event that the Listbox is cleared, or items are removed.

Kind Regards
Devon
Feb 11 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by Adam Klobukowski | last post: by
3 posts views Thread by Thunder$truck | last post: by
2 posts views Thread by John | last post: by
5 posts views Thread by Matthew Wells | last post: by
7 posts views Thread by Lit | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.