J
JamesL
I have a listview object on a form. I read lines out of a text file and
want to add them to the listview.
I used the following code. The problem I run into is that while the help
file tells me to put a string in the lvwobject.items.add(string,0) when I
actually do it, the code widow tells me I have to put a listviewitem in the
items.add line. So what is the right way to add the text to the listview?
Dim ExpDate As String
Dim Expense As String
Dim Amt As String
Dim Pmt As String
Dim objListItem As ListViewItem
objListItem = lvwExpenses.Items.Add(ExpDate, 0)
objListItem.SubItems.Add(Expense)
objListItem.SubItems.Add(Amt)
objListItem.SubItems.Add(Pmt)
James Lysaght
want to add them to the listview.
I used the following code. The problem I run into is that while the help
file tells me to put a string in the lvwobject.items.add(string,0) when I
actually do it, the code widow tells me I have to put a listviewitem in the
items.add line. So what is the right way to add the text to the listview?
Dim ExpDate As String
Dim Expense As String
Dim Amt As String
Dim Pmt As String
Dim objListItem As ListViewItem
objListItem = lvwExpenses.Items.Add(ExpDate, 0)
objListItem.SubItems.Add(Expense)
objListItem.SubItems.Add(Amt)
objListItem.SubItems.Add(Pmt)
James Lysaght