Hur söker man ett ord i en ListView så att den markerar den rad där ordet förekommer? //Sample CodeSöka i ListView
/StefanSv: Söka i ListView
Dim listN As ListItem
ListView1.View = lvwReport
ListView1.ColumnHeaders.Add , "kolumn 1", "Kolumn 1"
ListView1.ColumnHeaders.Add , "kolumn 2", "Kolumn 2"
ListView1.ColumnHeaders.Add , "kolumn 3", "Kolumn 3"
ListView1.FullRowSelect = True
Set listN = ListView1.ListItems.Add(, "item 1", "Item 1")
listN.ListSubItems.Add , "listsubitem 11", "Listsubitem 11"
listN.ListSubItems.Add , "listsubitem 12", "Listsubitem 12"
Set listN = ListView1.ListItems.Add(, "item 2", "Item 2")
listN.ListSubItems.Add , "listsubitem 21", "Listsubitem 21"
listN.ListSubItems.Add , "listsubitem 22", "Listsubitem 22"
Set listN = ListView1.ListItems.Add(, "item 3", "Item 3")
listN.ListSubItems.Add , "listsubitem 31", "Listsubitem 31"
listN.ListSubItems.Add , "listsubitem 32", "Listsubitem 32"
Set listN = ListView1.FindItem("listsubitem 12", lvwSubItem, , lvwPartial)
listN.Selected = True
//peterh