RE: Records stored in Text File (VB6)



Hello,

follow this commands :

=================================================
Const ForReading = 1, ForWriting = 2
Set fso = CreateObject("Scripting.FileSystemObject")
Set x = fso.OpenTextFile(App.Path & "\hostnames.txt", ForReading)

Do While x.AtEndOfStream = False

mystring = Trim(x.ReadLine)
msgbox mystring

loop



--
IBM IGS
IT Specialist
=======================
Advanced Repackager with Wise Package Studio - Certified


"Keith" wrote:

> Ladies / Gentlemen,
>
> I've got a text file containing fixed length records. I'm using VB6 and
> need access to these records. Two Questions:
>
> 1. How do you open the text file?
> 2. How do you determine the end of a line in a text file?
>
> Thanks,
>
> KF
.


Loading