Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to overwrite data in file?
I am using a text file to log progress of a long-running macro.
I want to continuously overwrite the first line with variable-length data. The following paradigm demonstrates my problem: Open myPath For Output Access Write As #fd Print #fd, "1234567890123456789012345678901234567890" Seek #fd, 1 Print #fd, "abcde" Close #fd I want the file to contain only "abcde". But the actual result is: abcde 890123456789012345678901234567890 Apparently, "abcde" CRLF overwrote the data, but that did not cause the end-of-file to be rewritten. How can I cause the end-of-file to be rewritten? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel File Overwrite | Excel Discussion (Misc queries) | |||
accidental file overwrite | Excel Discussion (Misc queries) | |||
how to save a file and overwrite existing file | Excel Programming | |||
Prevent PivotTable Overwrite Warning and Disallow Overwrite | Excel Programming | |||
automatic overwrite file | Excel Programming |