Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Delete first line line(s) of text-file?

as long as you found an answer somewhere, somehow, that's all that matters.

--


Gary

"Charlotte E." <@ wrote in message ...
Sorry for a late reply, but I've spendt the week-end playing with your
code-example :-)

Got it to work - thanks :-)


CE



Charlotte E. wrote:
I have a spreadsheet that writes some logging of its approach to a
text-file, using:

Open LOGFile For Append As #FileNumber


However, over time this text-file just keeps on growing!
And, I really just need to be able to see the latest entries :-)


Is there any way to determine of the text file has grown to, say 100
lines? And, if there is, is there any way to delete all, but the last
100, lines in the text file?

Using Append makes the last 100 lines in the text file into the 100
latest entries, so it really need to be the first lines of the text
file that get deleted...

And it is not an option to delete the text file, since the logging
only makes around 10 lines a day, and I need to be able to view at
least a week back, thus approx. 100 lines...


Can this be achived?


TIA,

CE





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Challenge - Excel Line Feed Character CHR(10) - How to Delete and keep the text formatting without going ro single line in a cell ? No Name Excel Worksheet Functions 7 October 7th 09 11:10 AM
import huge text file line-by-line? rachel Excel Programming 2 November 6th 04 04:43 PM
Delete a line in a text file Francis Ang[_3_] Excel Programming 3 June 11th 04 04:27 AM
Delete a line in text file Francis Ang[_2_] Excel Programming 2 June 11th 04 04:26 AM
Delete a line of text file Francis Ang[_3_] Excel Programming 1 June 9th 04 02:16 PM


All times are GMT +1. The time now is 06:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"