If I understand it right, you want to open an existing file, write some new content to it, then save it again right?
If so I've made a little program(attached to this post). In the folder there is a txt file called "Myfile". When you compile the project it will open this file and print what the current text in it is... Now you can write some new text then press a key.. It now save the changes to that file and end... When you open the program again, you can see that the content have changed etc...
I know this is a very basic system... But it should give you the idea
I hope it helps.
[EDIT]:
Just realized that I wrote it in DarkBasic Pro, and this is the Darkbasic classic forum...

Well there's an exe file in the download. Here you got the source code:
print "Hello..."
print "Press any key to let the program read the text file in this folder..."
wait key
if file exist("Myfile.txt") = 1
open to read 1,"Myfile.txt"
read string 1,hello$
close file 1
else
print "ERROR! File does not exist!"
wait key
end
endif
print "Current file contains the text: ", hello$
print "Now you can edit the file! Write what you want"
print "When you have written what you want, press any key to edit the file"
input "Here: ",newEdit$
wait key
if file exist("Myfile.txt") = 1
delete file "Myfile.txt"
open to write 1,"Myfile.txt"
write string 1,newEdit$
close file 1
end
endif
That code should work in DarkBasic Classic.
-The Nerd