ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   update txt file (https://www.excelbanter.com/excel-programming/331952-update-txt-file.html)

andy[_6_]

update txt file
 
hi hope someone can help
i can write values from excel to a txt file
but it overwrites the exsisting value in the txt file
can someone please tell me how you can just update the txt file with the new
values



Andy



Sarah B via OfficeKB.com

update txt file
 
what about opening the old version in Excel, making your changes, and then
saving it again as the text file?

Sarah

--
Message posted via http://www.officekb.com

Harald Staff

update txt file
 
Hi Andy

Append, like this:

Sub test()
Dim iFnum As Integer
iFnum = FreeFile
Open "C:\temp\text.txt" For Append As #iFnum
Print #iFnum, Now
Close #iFnum
End Sub

HTH. Best wishes Harald

"andy" skrev i melding
...
hi hope someone can help
i can write values from excel to a txt file
but it overwrites the exsisting value in the txt file
can someone please tell me how you can just update the txt file with the
new values



Andy





All times are GMT +1. The time now is 05:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com