Private Sub Command1_Click()
Dim nFileNum1 As Integer
Dim nFileNum2 As Integer
Dim sText As String, sNextLine As String, lLineCount As Long
'MsgBox Adodc1.ConnectionString
Open "C:\stkcde2.txt" For Input As nFileNum1
Open "C:\stkcde3.txt" For Output As nFileNum2
Do While Not EOF(nFileNum1)
Line Input #nFileNum1, sNextLine
'do something with it
'add line numbers to it, in this case!
sNextLine = sNextLine & vbCrLf
sText = sText & sNextLine
Print #nFileNum2, sText
Loop
Text1.Text = sText
' Close the file
Close nFileNum2
Close nFileNum1
End Sub