Philip,
If you want to read the text line by
line you would use the Line Input Method.
Dim FileNumber as Integer
Dim MyString as String
FileNumber = FreeFile
Open "c:\test.txt" For Input As #FileNumber
Do Until EOF(FileNumber)
Line Input #FileNumber, MyString
'One line of data now contained in
'MyString variable. Process as necessary.
Loop
--------------------------------------
Cardyin Kim
C/S & Web Development Analyst
Information Services
San Antonio Community Hospital
ckim@s... (xxx)xxx-xxxx
--------------------------------------
-----Original Message-----
From: philip.moh@a... [mailto:philip.moh@a...]
Sent: Monday, April 16, 2001 3:00 AM
To: professional vb
Subject: [pro_vb] Re: text file
does anyone know how to use VB to open a text file and read the content. the
text file contain some line and i want to know how to read line by line???
please help.
> -----Original Message-----
> From: Yoel Pedersen [SMTP:y.pedersen@g...]
> Sent: Monday, March 05, 2001 9:14 PM
> To: professional vb
> Subject: [pro_vb] Re: text file
>
> > Hello Friends:
> >
> > What I want to do is create a text file, write some data to it and then
> > save the file in the C:\textfile directory in VB? Does anyone know how
> to
> > do this? Do you have the sample code of it?
> >
> > Thanks in advance,
>
> Dim FileNumber As Integer
>
> FileNumber = FreeFile
>
> Open "C:\Textfiles\textfile.txt" For Output As #FileNumber
>
> Print #FileNumber, "Some input"
>
> Close #FileNumber
>
> Hope this helps