| From: sarah | E-mail: shakingmyass@hotmail.com | 1 |
Date: Sunday, November 25, 2001 at 22:13:49
Subject: text file
Comments:
How does a text file work?
If i saved some data how do i retrieve it.
| From: Lex | E-mail: webmaster@jadsoft.ch | 2 |
Date: Saturday, October 12, 2002 at 16:06:04
Website: http://www.jadsoft.ch
Subject: RE: text file
Comments:
Hi,
You saved your text data with an Open-statement, eg.:
| Open App.Path & "\test.txt" For Output As #1 Print #1, "This is a test" Close #1 |
To retrieve the data read it with the Open-statement:
Dim TextLine as String
Open App.Path & "\test.txt" For Input as
#1
Do While Not EOF(1)
Line Input #1, TextLine 'Text of this line will be stored in variable TextLine
'Do something with text.
Loop
Close #1
Feel free to mail me for further questions.
This forum is no longer taking new messages or replies since 01 November 2002. The above material is for reference purposes only.
The new Visual Basic 6.0 forum can be found here.