Private
Sub
Command1_Click()
Open
"MyFile.txt"
For
Output
As
#1
‘ MyFile.Txt dosyası açılır.
Print #1, Text1.Text
‘ Textbox’a bilgiler yazılır.
Close #1
End
Sub
Private
Sub
Command2_Click()
Text1.Text =
""
‘ Textbox’ı temizler.
Open
"MyFile.txt"
For
Input
As
#1 ‘ Açılan
"MyFile.txt"
dosyası okunur.
Do
Until
EOF(1)
Line Input #1, temp$
If
Text1.Text <>
""
Then
‘Eğer TextBox kutusu boş değilse yeni text ekle.
Text1.Text = Text1.Text & vbCrLf & temp$
Else
Text1.Text = temp$
End
If
Loop
Close #1 ‘ Dosyayı kapat.
End
Sub