|
-
Mar 11th, 2011, 04:30 AM
#6
Re: when vb listboox1.selecteditem hits the last item listbox1.selectedindex=0
This is the time when you type words in order to make your post understandable, posting code (without code tags) and hoping that your title is sufficient, often is not.
What you "appear" to be asking, is that when the user selects the last item in the listbox, that you actually select the first item. This would mean that your user can never select the last entry. Is this what you want? I can only guess what you are trying to do is create a roll-over method?
The first place you should check is the documentation, which has a list of all the properties of a listbox control, of which one is items, which has a count property. As the Index is 0 based, you would have to -1 from the value.
Code:
ListBox1.Items.Count -1
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|