View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Auric__ Auric__ is offline
external usenet poster
 
Posts: 538
Default Delete all, but the last 23 lines of an external text file

GS wrote:

GS wrote:

Function ReadTextFileContents(Filename As String) As String [snip]
Sub WriteTextFileContents(TextOut As String, _


Y'know, upon seeing your code, it occurs to me that I never thought
to move that code into functions myself. Sigh.


Well, I use these in every app because I don't use the Registry to
store anything. This keeps my stuff 'fully portable' in that all app
settings/configs are stored in text files.


AFA settings are concerned, I use standard .ini files, read from & written to
using the standard Get/WritePrivateProfileString WinAPI calls. ;-)

I suspect you do same for
routines you keep using over and over. I just drop modules containing
what I call 'default' or 'core' routines into VBA projects when I first
create them. It's unfortunate that VBA components don't ref their
source files as do VB components, huh!


I meant *specifically* reading & writing to text files in their entirety. I
*always* retype that code without thinking about it. (Yeah, yeah, I know,
that's what functions are for.)

--
She's pretty, but dumb as a brick.