I have a program that works on another computer. Basically I want to populate a list view and the code is below. On this computer, I get a Run-time error 380, Invalid property value on the "itmVar.SubItems(1)="DEF" line. I finished the program on the other computer but now need to use a list view on the computer that's having the problem. One more tidbit: This morning I decided to repair VB6 from the CD, and right after I did that, it worked. I did some other things (non-coding), and then a couple hours later came back to the exact same project, ran it, and got the error again. I then repaired (no success), uninstalled and reinstalled (still no success). If anyone has any suggestions, I'd very much appreciate it. One more thing: I'm using MS WIndows Common Controls 6.0 (SP6), which is pointing to MSCOMCTL.OCX.
Thanks Experts :-)
Dim itmVar As ListItem
Set itmVar = Me.lvwClassCode.ListItems.Add()
itmVar.Text = "ABC"
itmVar.SubItems(1) = "DEF"