Click here to Skip to main content
15,896,453 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
Is anyone know how to add/append some data/text in a text file...??? the situation here is: After writing of the text file you will close it after a while you will open it again and you will add/append some data/text on it...

Example : The text file contains-

Juan de la Cruz
Goerge Black

i will add "Danilo Condes" on it so the out should be:

Juan de la Cruz
Goerge Black
Danilo Condes

Please if you have any suggestion that might help/solve the problem. Help me...Any suggestion will be appreciated....Thanks
Posted

1 solution

Use open with an Append
VB
Dim intFileHandle As Integer
Dim myStr As String
myStr = "Hello World"
intFileHandle = FreeFile
Open "myFile.txt" For Append As #intFileHandle
Print #intFileHandle, myStr
Close #intFileHandle
 
Share this answer
 
Comments
jdandes 20-Sep-11 10:08am    
Thanks.... these is simply very usefull....:-)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900