
'===== Read File ====='
Private Sub Command1_Click()
Dim GetText As String
If Dir("C:\1.txt") <> "" Then
Text1.Text = Clear
Open "C:\1.txt" For Input As #1
Do While Not EOF(1)
Input #1, GetText
Text1.Text = Text1.Text & GetText & vbCrLf
Loop
Close #1
Else
MsgBox "file C:\1.txt Not Found "
End If
End Sub
'===== Write On File ====='
Private Sub Command2_Click()
Open "c:\1.txt" For Output As #1
Print #1, Text1.Text
Close #1
End Sub
No comments:
Post a Comment