for some reason I am not able to add a subitem to my main item, how do I add more columns or whatever I need to do?
properties, then columns then insert.. make the columns any width you like them to be.
This will make a listview with columns Name, Color, Speed.
Private Sub Form_Load()
lvw.ColumnHeaders.Add "","c1","Name"
lvw.ColumnHeaders.Add "","c2","Color"
lvw.ColumnHeaders.Add "","c3","Speed"
End Sub
Private Sub AddLVWItem(ItemName As String, Color As String, Speed As String)
Dim obj As ListItem
Set obj = lvw.ListItems.Add( , ItemName, ItemName)
obj.SubItems(1).Text = Color
obj.SubItems(2).Text = Speed
End Sub
I've written this from memory only, not having VB6 on my PC at the moment.
Hope this helps.
Ok, I got all of that but now I'm not able to find the last # on the listview. This is my code but for some reason it gives me the error:Index out of Bounds.
Code:SpamCount = frmLists.Spam.FindItem(strUser).ListSubItems(2).text
That IS the correct index, but for some reason it's all whacked out.
i'm pretty sure you do .ListSubItems.Add ,,"text" not just .SubItems(index).Text
I don't want to add to that second index, I want to find out what that index is.