Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Visual Basic ( VB ) (http://www.go4expert.com/forums/visual-basic/)
-   -   help on how to open text files using a list box (http://www.go4expert.com/forums/help-text-files-using-list-box-t21927/)

luchi 28Apr2010 06:18

help on how to open text files using a list box
 
am doing a project fo school and i can't figure out how to open text files using a list box please help me

satyedra pal 28Apr2010 12:04

Re: help on how to open text files using a list box
 
For adding any file in the listbox of visual basic we use the following code:

Quote:

Sub FillListBox()

Dim lfiles As String

listbbox.Clear

Open "D:\SATYA\NEW.TXT" For Input As #1(file no.)

While Not EOF(1)

Line Input #1(file no.), lfiles(variable)

listbbox.AddItem lfiles

Wend

Close #1

End Sub


All times are GMT +5.5. The time now is 05:15.