lvINFO.ListItems.Add , , cboType.Text
lvINFO.ListItems(lvINFO.ListItems.Count).ListSubItems.Add , , txtTime.Text
lvINFO.ListItems(lvINFO.ListItems.Count).ListSubItems.Add , , txtAmount.Text
lvINFO.ListItems(lvINFO.ListItems.Count).ListSubItems.Add , , Date
I have my regular listview code that would typically add the itme @ the bottom of the listview...HOWEVER, since my items have been sorted the item is added in the listview according to where cboType.text should end up. I'm not sure how to add the rest of the information (txtTime, txtAmount, & Date) to the correct index. It wouldn't work by using the find function or w/e because cboType.text is listed multiple times in the listview already.
Any ideas on how I would find the correct index to add the txtTime, txtAmount & Date to my listview?
Doesn't Add return something for you to use if you need to reference the newly added item?
Well, the way I remedied this is busing some pscode code I found
Set lItem = lvINFO.ListItems.Add(, , cboType.Text)
lItem.ListSubItems.Add , , txtTime.Text
lItem.ListSubItems.Add , , FN.Amount(cboType.Text, txtTime.Text)
lItem.ListSubItems.Add , , Date
lItem.Selected = True
lItem is an iteger