Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21273

[RESOLVED] How to read Text file content?

$
0
0
Hey guys...

I actually know how to open txt file :
Code:

Dim File as string
Open "C:\test.txt" for input as #1
input#1,file
close#1
text1.text=file

The problem with latter code is that the statement after OPEN must be a direction with ""! So if i want to put something like Text2.text which contains a direction exactly like "C:\test.txt" , instead of "C:\test.txt" after Open statement , what kind of code should i write instead?

Simply , i want this :
Code:

Dim File as string
Open TEXT2.TEXT for input as #1
input#1,file
close#1
text1.text=file


Thanks...

Viewing all articles
Browse latest Browse all 21273

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>