Hello everybody.
My program has to read a text file and display the contents in a listbox. Here is the code I'm using:
The problem is that it only shows the first six lines. Does anybody have an idea why?
Thanks for your help.
My program has to read a text file and display the contents in a listbox. Here is the code I'm using:
Code:
nFileNum = FreeFile
Open "c:\textfile.txt" For Input As nFileNum
Do While Not EOF(nFileNum)
Line Input #nFileNum, sNextLine
list_box.AddItem sNextLine
list_box.Refresh
Loop
Thanks for your help.