PDA

Click to See Complete Forum and Search --> : String help


Osiris
Dec 15th, 2000, 02:15 PM
any1 know how i could get the text of an unopened text file into a string?
for example, i have a bunch of text files in my C: drive and i want to make my program read what these text files have in them, how would i go about doing that?

Dec 15th, 2000, 03:22 PM
In order to read the file, you must open it.

Dec 15th, 2000, 05:06 PM
To read a text file into a string, but as Megatron said, you must open it first.

Dim MyString As String
Open "C:\MyTextFile.txt" For Input As #1
MyString = Input(LOF(1), 1)
Close #1

Hope that helps.

Osiris
Dec 15th, 2000, 06:06 PM
Thanx you guys, you are so good to me!!