[SOLVED] Listview Column Items As Strings?
Well I'm newish to vb.
I can't get something as simple as this to work:(
basically what i need to do, is get two values of two items in two different columns of a listview into two strings, then do some other stuff but i know how to do that so dont worry.
but after its done the other stuff i need it to go to the start and get the next two values and do it again until there arent any more.
I know it's something about dim i as integer, etc. but im just confused.
please help:afrog:
Re: Listview Column Items As Strings?
Try doing something like this:
Code:
Private Sub Command1_Click()
Dim myItem As String
Dim mySubItem As String
Dim i As Long
With ListView1
If .ListItems.Count = 0 Then Exit Sub
For i = 1 To .ListItems.Count '<<<indexing in listview begins with 1
myItem = .ListItems(i).Text
mySubItem = .ListItems(i).SubItems(1)
'do your analyses here
Next i
End With
End Sub
Re: Listview Column Items As Strings?
thats exactly what i was looking for.
if theres some kind of voting system or something let me know. ill + you for sure.
thanks allot mate.
marked as resolved.
1 Attachment(s)
Re: Listview Column Items As Strings?
Quote:
Originally Posted by
allenk
thats exactly what i was looking for.
if theres some kind of voting system or something let me know. ill + you for sure.
thanks allot mate.
marked as resolved.
Yes, you can click the white flower like icon on the left of any useful post to rate it.
Attachment 70864