andrewo
07-25-2001, 06:02 AM
I am using a a text1.text
and command1 button
I want to type something into the text1.text and I want it to save into a text file, if there isnt an existant file , it will create one
~
try using some code like this<pre> <font color=blue>Open</font color=blue> MyFileName <font color=blue>For <font color=blue>Output</font color=blue> As</font color=blue> #1
<font color=blue>Print</font color=blue> #1, Text1.Text
<font color=blue>Close</font color=blue> #1</pre>
andrewo
07-25-2001, 06:59 AM
i want to read a text file now
~
Computer_Guy
07-27-2001, 12:16 PM
You would say
Dim FileNum as Integer
Open (FileName) For Input as FileNum
Input, #MyFile
Close Filenum
End Sub
If That Doesn't work, it's something like that, I did that off the top of my head
Squirm
07-28-2001, 09:07 AM
The correct syntax is similar to this:
<font color=blue>Open</font color=blue> MyFileName For <font color=blue>Input</font color=blue> As #1
<font color=blue>Input</font color=blue> #1, Text1.Text
Close #1
OK?
Computer_Guy
07-28-2001, 08:02 PM
Look, I don't have VB at my house or notes out, okay?
I think he got the idea though after us two helping out