Search Tools Links Login

Add Item to listview


takes a string like "Johnny*(722)555-5555*35" and splits it into columns on a listview control(designed for Report view)

Original Author: Ridium

Inputs

lst = Listview control
zString = data string with *'s between the words

Code

Sub ReportAddTo(lst As ListView, zString As String)
Dim bleh As ListItem
'zString = "One*Two*Three*Four*Five"
On Error Resume Next

Set bleh = lst.ListItems.Add(, , Split(zString, "*")(0))
    
For i = 1 To 200
  bleh.SubItems(i) = Split(zString, "*")(i)
Next i

End Sub

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 99 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.