View Single Post
  #3 (permalink)  
Old December 22nd, 2003, 02:46 PM
CarlR CarlR is offline
Authorized User
Join Date: Aug 2003
Location: Penn Yan, New York, USA.
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts


You can also read a text file into a listbox using native VB -- without any references. For instance, assume :"C:\Temp.txt" is the
file containing the info and lstData is the listbox you wish to fill:

' ************************************************** *********
intChan = FreeFile
Open "C:\Temp.txt" For Input As intChan
Do While Not EOF(intChan)
  Line Input #intChan, InTxt 'InTxt holds each line of data
  lstData.AddItem InTxt
Close intReadChan
' ************************************************** *********


Reply With Quote