It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

Need help on index for items in Listbox

Moderator: dafunkymunky

Need help on index for items in Listbox

Postby VBKey on Thu Jun 12, 2008 12:06 pm

Hi all, I spent near half a day could not work it out. My question looks very simple (might be very simple for you), here is a list box shown as followed:

apple
orange
banana
.
.
Lime
.
.

The order of this list could be changed by user, in the end, I need to assign the index of "lime" for example, to a text field (txtorder). Any idea? Thank you.
VBKey
 
Posts: 2
Joined: Tue May 20, 2008 1:55 pm

Postby sendtoanurag on Fri Jun 13, 2008 12:21 pm

Try This

For i = 0 To List1.ListCount - 1

If List1.List(i) = "LIME" Then
txtText1 = i
End If
Next
sendtoanurag
 
Posts: 29
Joined: Tue Mar 18, 2008 2:51 pm


Who is online

Users browsing this forum: No registered users and 6 guests