How do I change t he code in such a way that the number(value) I store in a file is over write ...currently i only know how to write values into the file but dunno how to overwrite.

:
...
...
intcount=intcount +1
Private cmfFile_Click()
Dim intFNum As Integer
intFNum= FreeFile
Open "C:123.txt" For Output As # intFNum

Write #intFNum,intcount;
Close #intFNum
...

the result would be :1,2,3,4...
but i want the number to overwrite to that there is only an Incremented number each time in the file when the button is click...thanks!