Reading a txt file

Dr_Zeus
11-24-2002, 07:50 AM
How to read and write on a txt file, assuming on the file there's an array?

UncleSam
11-24-2002, 08:05 AM
Correct me if i'm wrong, but you can't put an array in a file. You can put in the values of an array. (and isn't it in?)

Dr_Zeus
11-24-2002, 08:09 AM
Assume a txt file in wich I've written:

1 planes
2 cars
3 potatoes

how to read the file and put data in textbox?

UncleSam
11-24-2002, 08:11 AM
Open [filename] For Input As #1 'open the file

Do While Not EOF(1)
Line Input #1, FileVar 'put it to a var

text1.text= FileVar & vbcrlf 'put it in a textbox
Loop

Close #1 'close file



and put the textboxe's multiline property to true

Kamochan
11-24-2002, 11:39 AM
What does VBclrf do?

UncleSam
11-24-2002, 11:40 AM
it makes a



(new line)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum