I have a more than one listview with different numbers of subitems. I wanted to make this bit of code more dynamic. I can make it work this way:
For i = 1 To 4
strTEST= strTEST & ListView1.SelectedItem.SubItems(i) & "--"
Next i
msgbox strTEST
Instead of "For i = 1 to 4" it would help me if I could make it "For i = 1 to ListView1.selecteditem.subitems.COUNT" or even a "for each subitem in ...."
Needless to say, I can not seem to get either 'ideal' situation working.
Thanks in advance.
For i = 1 To 4
strTEST= strTEST & ListView1.SelectedItem.SubItems(i) & "--"
Next i
msgbox strTEST
Instead of "For i = 1 to 4" it would help me if I could make it "For i = 1 to ListView1.selecteditem.subitems.COUNT" or even a "for each subitem in ...."
Needless to say, I can not seem to get either 'ideal' situation working.
Thanks in advance.