Brian
2004-09-10 13:05:18 UTC
Can anyone help, I'm using a ListView control from CommControl 6.0, when I
try to fill the listview using the code below, I get a Runtime error 380
Invalid Property Value when executing the first .SubItems line.
Any suggestions?
Sub tempList()
Dim lstStuff As MSComctlLib.ListItem
Dim count%
ListView1.ListItems.Clear
For count = 1 To 3
Set lstStuff = ListView1.ListItems.Add(, "X" & count, "One")
With ListView1
With lstStuff
.SubItems(1) = "Two" & count
.SubItems(2) = "Three" & count
End With
End With
Next count
End Sub
Thanks,
Brian
try to fill the listview using the code below, I get a Runtime error 380
Invalid Property Value when executing the first .SubItems line.
Any suggestions?
Sub tempList()
Dim lstStuff As MSComctlLib.ListItem
Dim count%
ListView1.ListItems.Clear
For count = 1 To 3
Set lstStuff = ListView1.ListItems.Add(, "X" & count, "One")
With ListView1
With lstStuff
.SubItems(1) = "Two" & count
.SubItems(2) = "Three" & count
End With
End With
Next count
End Sub
Thanks,
Brian