| Oggetto |
Re: Insert a line new string at the top of the text file using vb |
| Da |
Alice |
| Data |
Fri, 4 Apr 2008 01:33:22 +0200 |
| Newsgroups |
it.comp.lang.visual-basic |
> I need to insert a new line string at the top of the existing text
> file using vb. The only way to add, is by using the write or print
> function, which will insert the string at the bottom of the text. I
> really hope someone can solve this problem. thanks.
Open "OldFile" For Binary As #1
Open "NewFile" For Output As #2
Print #2, "New Line" + vbCrLf + Input(LOF(1), #1)
Close #2
Close #1
Kill "OldFile"
Name "NewFile" As "OldFile"
--
Ciao Fede
By Chicco Production
http://www.webalice.it/bychicco/
|
|
|
|