Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

searching a list view

Status
Not open for further replies.

zann

Programmer
Nov 7, 2002
7
0
0
ZA
Hi all

I have a listview that contains 2 columns, the first is code the second is the description. I would like to know how to loop through all entries in the list view searching the first column for a particular value.

what is the terminating loop condition?how do u get the no of rows in the listview???

thanx zann
 

Give something like this a try...

[tt]
Dim I As Integer
For I = 1 To LV.ListItems.Count
If LV.ListItems(I).Selected = True Then
MsgBox LV.ListItems(I).Text
End If
Next I
[/tt]

Good Luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top