-
I'm fairly new to VB and development so please excuse the level of knowledge, but hopefully I can gain a lot here.
I've designed a simple form with some textboxes and a command button. How do I add the text from the textboxes to my four columns in my listview with my click event on the button. I tried variuos methods but the data is being written down one column, not across the columns as I need.
Thanks,
-
<?>
'add columnHeaders..the width of the columns is
'the widht of the ctrl / 2 by the num of headers
'
Set sColumn = Listview1.ColumnHeaders.Add(, , "Name")
Set sColumn = Listview1.ColumnHeaders.Add(, , "Phone #1")
Set sColumn = Listview1.ColumnHeaders.Add(, , "Phone #2")
'
'add some data to the listitem (sItem)
Set sItem = Listview1.ListItems.Add(, , text1, 1, 1)
sItem.SubItems(1) = text2
sItem.SubItems(2) = text3
-
Thanks,
(HeSaidJoe) your code worked with a little modification suitable to my form. Thanks for the response.