Listview control Selected Items

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Garudzo
    New Member
    • May 2007
    • 20

    Listview control Selected Items

    Hi all

    I am developning a small application in MS Access 2003 on a windows XP platform. I am using windows treeview and Listview controls. I have discovered that I can do a multi select of listview items but I cannot iterate through all selected items. the listview only has a selectedItem property and not selectedItems.

    How do i iterate through the selected listview items?

    Garudzo
  • FishVal
    Recognized Expert Specialist
    • Jun 2007
    • 2656

    #2
    Originally posted by Garudzo
    Hi all

    I am developning a small application in MS Access 2003 on a windows XP platform. I am using windows treeview and Listview controls. I have discovered that I can do a multi select of listview items but I cannot iterate through all selected items. the listview only has a selectedItem property and not selectedItems.

    How do i iterate through the selected listview items?

    Garudzo
    Hi, Garudzo.

    If you mean MSComctlLib.Lis tView, then you can try the following.
    Code:
        Dim lvwList As MSComctlLib.ListView
        '........
        For Each itm In lvwList.ListItems
            If itm.Selected Then '....
        Next

    Comment

    Working...