Here is my text processing code (this is the basic functions I'm using)
Select Case Me.OpenMode
Case tfOpenReadOnly
If Me.AutoCreate Then
Open Me.Path For Binary Access Read As mhFile
Else
Open Me.Path For Input Access Read As mhFile
End If
Case tfOpenReadWrite
Open Me.Path For Binary Access Read Write As mhFile
Case tfOpenAppend
Open Me.Path For Append Access Read Write As mhFile
Case Else
' Bad value of OpenMode, throw an error
Err.Raise conErrInvalidProcCall
End Select
If Me.IsOpen Then
hFile = Me.Handle
If Not VBA.EOF(hFile) Then
Line Input #hFile, mstrCurrentLine
ReadNext = True
End If
End If
Line Input #hFile, mstrCurrentLine
|