Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm using
Print FileNumber, LineofText to copy one line of text from one text file to another text file. If I close the file and reopen them to write again, the previous data gets erased. How do I open the write file so what is already in it stays and what I add to it follows ? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What you didn't include in your message was your Open statement. If you open
the destination file for Output, existing contents are destroyed. If you open it for Append, new content is added to the end of the file. Open "C:\Test.txt" For Append Access Write As #FileNum -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting www.cpearson.com (email on the web site) "J@Y" wrote in message ... I'm using Print FileNumber, LineofText to copy one line of text from one text file to another text file. If I close the file and reopen them to write again, the previous data gets erased. How do I open the write file so what is already in it stays and what I add to it follows ? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excellent. Thanks, the Append worked.
"Chip Pearson" wrote: What you didn't include in your message was your Open statement. If you open the destination file for Output, existing contents are destroyed. If you open it for Append, new content is added to the end of the file. Open "C:\Test.txt" For Append Access Write As #FileNum -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting www.cpearson.com (email on the web site) "J@Y" wrote in message ... I'm using Print FileNumber, LineofText to copy one line of text from one text file to another text file. If I close the file and reopen them to write again, the previous data gets erased. How do I open the write file so what is already in it stays and what I add to it follows ? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How copy none excel data & paste in 2007 without overwriting data | Excel Discussion (Misc queries) | |||
New data will not sort with existing data from copied file | Excel Worksheet Functions | |||
Overwriting existing data in an Excel worksheet using ADO.Net | Excel Programming | |||
Overwriting existing data in an Excel worksheet using ADO.Net | Excel Programming | |||
updating of data without overwriting the previous data updated | Excel Programming |