Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text File Data Transfer

Status
Not open for further replies.

cwalshe

Programmer
May 28, 2001
84
IE
Hi there,

I have a text file stored on my hard drive that I want my VB app to take data from. The format of the data in the text file is as follows: two colums, e.g.

as then
12 jayboy
go ghiuis

etc.

I would like to be able to input this data into a combo box so that each entry corresponds to an individual line.

Any ideas...

Thx,

Cormac.
 
Hi,

try this

--------------------------------------------------
dim infile as byte, instring as string

infile = freefile
open "c:\tmp\test.txt" for input as #infile

While not eof(infile)
line input #infile, inline
combo1.additem inline
wend
--------------------------------------------------

Sunaj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top