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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reading Text File

Status
Not open for further replies.

boblovesyousomuch

Programmer
Dec 2, 2003
27
GB
Hello,

I have a text file storing comma delimted values. I would like to pull the string from the text file into a value.

ie.

Dim strIn s String

strIn = (Line from text document)

The text doc will never have multiple lines.

Any help greatly appreciated.

Carl
 
Dim a as Integer, str as String
a=FreeFile
Open "Your text file" for Input as a
Do While Not EOF(a)
LineInput a, str
process your str variable here
...
Loop

If you need more info, a short look into help index, look for "LineInput" or the Open method should give you all info you need.

Greetings,
MakeItSo

Andreas Galambos
EDP / Technical Support Specialist
(andreas.galambos@bowneglobal.de)
HP:
 
LineInput doesn't work

I am using Access 97 is that why, is there an alternative way?

Thanks
 
Sorry, posted it th worng way. It's used as:

Line Input #a, str


Must work - it's standard.

Regards,
MakeItSo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top