Would like to find a better way to read the end of a file rather than using INPUT until i get to the end of the file and then reading it... waiting for input to reach the end of the file takes far too long..
Printable View
Would like to find a better way to read the end of a file rather than using INPUT until i get to the end of the file and then reading it... waiting for input to reach the end of the file takes far too long..
You have some data, like a list of FirstNames as an example, and you want to get the last entry as quick as possible. Try saving the list of names in reverse order. Therefore the first entry in the file will last firstName entered.
Does this sound like a solution to your problem.
While your request is a tad ambiguous, there is certainly a way to position yourself to the end of any file that you have opened regardless of its size. You must open the file as BINARY for this to work.
Sub MoveToEnd()
Open "hugefile.txt" For Binary As #1
Seek #1, Lof(#1) ' Moves you to the end of the file
End Sub
What you do from here is up to you. <g>
I hope this helps.