View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bernard Bernard is offline
external usenet poster
 
Posts: 30
Default How do you send data to the same row of a text file everytime?

All,
How do I output to the same position in a Text file everytime? I want to
output data for a given Date so I'd like to put it in the same row for that
Date everytime, and so overwrite the existing data in that row?

I use the following command:
Write #10, dateline, variable1, variable2, variable3
'where dateline is today's date in excel date code.
I drop into the file at the row corresponding to last week's date e.g. row
40010.
Write #10, dateline+1, variable1, variable2, variable3
'where dateline +1 is tomorrow's date in excel date code.
I drop into the file at the row corresponding to today's date e.g. row
40017.

I want to be able to open my text file, overwrite the existing data in that
file for the row corresponding to today's date. Is it possible to write to a
specific row in a text file..... ?
thanking you
Bernard