|
-
Oct 28th, 2000, 04:00 PM
#1
Thread Starter
Frenzied Member
HI,
I need some smart guru to show
me how to write text to a the
line after the end of a file.
I am so confused and do not
understand how to.
Thanks.
Evan
-
Oct 28th, 2000, 04:02 PM
#2
if you mean AT the end and not AFTER the end it's:
Code:
Open "FileName" for Append As #1
-
Oct 28th, 2000, 04:08 PM
#3
Thread Starter
Frenzied Member
Theres a file that says
HI
and I want to make it say
HI
How are you
And I really dont know anything
I need more code.. like all of it
please.
-
Oct 28th, 2000, 04:16 PM
#4
then:
Code:
Open "FileWithHI" For Append As #1
Print #1, "How are you"
Close #1
that's all it takes.
-
Oct 28th, 2000, 04:18 PM
#5
Thread Starter
Frenzied Member
-
Oct 28th, 2000, 06:07 PM
#6
_______
<?>
A little info on txt files
Code:
'writing or reading data to or from a text file
'open for append adds the data to the end of file
'open for input opens the file for read only
'open for output opens the file and overwrites the file
'
'
Private Sub Command1_Click()
'this is the number of your file
Dim intFilenum As Integer
'set it to the next available free number
intFilenum = FreeFile
'this is your filename
Dim strFile As String
strFile = "A:\myfile.txt"
'this is the text you want to save (textbox)
Dim strText As String
strText = Text1.Text
'open the file for writing to as next freefile number
Open strFile For Append As intFilenum 'see above options
'write to the file
Write #intFilenum, strText 'to read use [input #filenum,strtext]
'close the file
Close intFilenum
End Sub
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Oct 28th, 2000, 07:43 PM
#7
Thread Starter
Frenzied Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|