Hi try this .. .. you will have to change the file names.
John
Sub readText(sMode As String, sFileName As String)
' ********************************************
' MODE OPERATION
' ---- ---------
' READ Read from sFileName to Text box
' Saving but not displaying the last line.
' WRITE Write to sFileName from the txtBox
' and include the last line.
' *******************************************
' Read Example: call readText("READ","C:\NewText.txt"

' Write Example: call readText("WRITE","C:\NewText.txt"

' *******************************************************
Select Case UCase(sMode)
Case "READ"
Dim sReadLine As String
Dim sTmp As String
Dim sLastLine As String
Dim bFlg As Boolean
' **** clear text box
frmMain.txtMain.Text = ""
' **** open text file for input
Open sFileName For Input As #1
Do Until EOF(1)
Line Input #1, sReadLine
If Not EOF(1) Then
sTmp = sTmp & sReadLine & vbCrLf
Else
sLastLine = sReadLine
End If '»If Not EOF(1) Then
Loop '»Do Until EOF(1)
Close #1
' *** show in text box
frmMain.txtMain.Text = sTmp
' ********************************
' Save your last line (sLastLine)
Open "C:\LastLine.txt" For Output As #1
Print #1, sLastLine
Close #1
' ********************************
Case "WRITE"
Kill sFileName
Open sFileName For Input As 1#
Open "C:\LastLine.txt" For Input As #2
Print #1, Trim(frmMain.txtMain.Text)
Line Input #2, sReadLine
Print #1, sReadLine
Close #1
Close #2
Kill "C:'\LastLine.txt"
End Select '»Select Case UCase(sMode)
End Sub