Write to Top

ukjock
05-18-2003, 04:53 PM
I am appending data to a file but the data keeps on going on the bottom of the file. Is there anyway to make it go to the top of the file instead?

The code I am using is below:

-----------------------------

History = FrmConfig.Label6.Caption & "/" & Text2.Text & ".dat"

Open History For Append As #1

If Text2.Text = "" Then
Else
Print #1, Format(Now, "dd/mmm/yy") & " | " & Format(Now, "Short Time") & " | " & Text3.Text
End If
Close #1

----------------------------

Thanks for your help

Chris

alp0001
05-18-2003, 09:19 PM
One way of doing it would be recreating the file. Basically, write the new data first to the file and then write the data that used to be before it (should temporarily save the old data in a variable of some sort before any writing is done).

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum