I am trying to figure out how to add additional items to a listview.

I want to add the items in my .vbs file.

What's wrong with these to items? I am not sure how to increment to the
next items:

 

 

If Mark < 1 Then

 

Dim NewLvItem

Set newLVItem = dObj.Control("listview1").NewItem

newLVItem.Text = "Aaron" & " " & dObj.Control("listview1").Text(1) & " "
& dObj.Control("listview1").Text(2)

newLVItem.Insert dObj.Control("listview1").Items.Count   + 1

newLVItem.Text(1) = "Obsidian Blue"

newLVItem.Text(2) = "42"

 

' here's the second item I am trying to add:

Dim NewLvItem2

Set newLVItem2 = dObj.Control("listview1").NewItem

newLVItem2.Text = "Jeff" & " " & dObj.Control("listview1").Text(1) & " "
& dObj.Control("listview1").Text(2)

newLVItem2.Insert dObj.Control("listview1").Items.Count + 1 

newLVItem2.Text(1) = "Red"

newLVItem2.Text(2) = "97"

 

Mark = Mark + 1

End if

 

Any help appreciated.

Jeff Weiss

 

Reply via email to