Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
500MB 27GB Web Hosting - $9.95/Month
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleLoad a ListBox using the lines in a file
Keywordsadditem, ListBox, line, file
CategoriesControls
 
Use Line Input# to read the file and add each line to the ListBox.
 
Private Sub cmdLoad_Click()
Dim fnum As Integer
Dim file_line As String

    lstLines.Clear
    fnum = FreeFile
    Open txtFile.Text For Input As fnum
    Do While Not EOF(fnum)
        Line Input #fnum, file_line
        lstLines.AddItem file_line
    Loop
End Sub
 
Formatted by Neil Crosby
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated