C:\Users\Mike\My_Documents\MostRecentActivities.txt
One line for each activity.
If the text file does not exist (or carelessly deleted), then create the text file and add a new line as first activity, e.g. "Hello world, " & Format(Now(), "hh:mm:ss AM/PM mmm, dd, yyyy)"
If the text file is exist and there are less or equal to 99 lines of text, then add a line as new activity.
If there are 100 lines or more, remove oldest activity, then add the new activity. So if there are already 100 lines, remove first line, then add a new line at the bottom (assuming that activity is from oldest to newest; however, it is also okay to go from newest to oldest). In this case, it will never exceed 100 lines.
Some scratch, not all the code for what I want to do. No idea how to get number of lines in text file, no idea how to delete a line from the top.
Please Login or Register to view this content.
Bookmarks