Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
MSDN Visual Basic Community
 
 
 
 
 
 
TitleCopy multi-line text into a ListBox using Split
KeywordsListBox, copy, additem, text, TextBox
CategoriesControls
 
Use Split to break the text into lines. Loop through the lines adding them to the ListBox.
 
Private Sub Command1_Click()
Dim values As Variant
Dim i As Integer

    List1.Clear
    values = Split(Text1.Text, vbCrLf)
    For i = LBound(values) To UBound(values)
        List1.AddItem values(i)
    Next i
End Sub
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated