View Single Post
Old Oct 27th, 2005, 12:11 AM   #1
ViOLATiON
Programmer
 
Join Date: Sep 2005
Posts: 58
Rep Power: 4 ViOLATiON is on a distinguished road
Using Text Files...

Ok, I've made a textbox sort of like a text editor (ie: notepad), but I would like it to read the text in the textbox from a .txt file .. I think thats how you say it.. :eek:

The reason for this is because its going to be a fairly long paragraph.

Here's a quick little diagram to help clear things up



<3 mspaint

I'm sure this is really easy, maybe I'm using the wrong words on Google.

EDIT: I've found this:

Dim Myfile As String
'Replace "c:\testfile.txt
file = "c:\testfile.txt"
Open Myfile For Input As #1
Text1.Text = Input(LOF(1), #1)
Close

When i run it i get an error, i click Debug and the line Open Myfile For Input As #1 is highlighted.

Any ideas?

Thanks in advance

Last edited by ViOLATiON; Oct 27th, 2005 at 12:22 AM.
ViOLATiON is offline   Reply With Quote