|
|
Title | Load a ListBox using the lines in a file |
Keywords | additem, ListBox, line, file |
Categories | Controls |
|
|
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
|
|
|
|
|
|