locked
Selected Items in Listview RRS feed

  • Question

  • I want only the selected items from a listview saved to a text file.

    Here's what I have so far.

    count = Me.ListView1.Items.Count
                ' Loop through checked items in Listview
                For Each J In ListView1.CheckedIndices
                    For I = 0 To count - 1
                        For s = 0 To 5
                            newstr(s) = ListView1.Items.Item(I).SubItems(s).Text
                        Next
                        name = newstr(0)
                        width = newstr(1)
                        height = newstr(2)
                        number = newstr(3)
                        code = newstr(4)
                        emotion = newstr(5)
                        outputstream.WriteLine("'" & name & "','" & width & "','" & height & "','" & number & "','" & code & "','" & emotion & "',")
                    Next I
                Next J
                outputstream.Close()



    Thursday, October 16, 2008 6:23 PM

Answers

  • It was causing problems but it's sorted now, thanks for looking.

    Graham
    Thursday, October 16, 2008 10:55 PM

All replies

  • Is this causing problems? I do not see a question is your post.
    Thursday, October 16, 2008 7:31 PM
  • It was causing problems but it's sorted now, thanks for looking.

    Graham
    Thursday, October 16, 2008 10:55 PM