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?
Printable View
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?
In order to read the file, you must open it.
To read a text file into a string, but as Megatron said, you must open it first.
Hope that helps.Code:Dim MyString As String
Open "C:\MyTextFile.txt" For Input As #1
MyString = Input(LOF(1), 1)
Close #1
Thanx you guys, you are so good to me!!