Sub SaveTextBoxInFile(ByVal FileName As String, ByRef Text As TextBox)
On Error Resume Next
Close
Open FileName For Output As #1
If Err > 0 Then Exit Sub
Print #1, Text.Text
Close
End Sub
Sub GetFileToTextBox(ByVal FileName As String, ByRef Text As TextBox)
On Error Resume Next
Close
Open FileName For Input As #1
If Err > 0 Then Exit Sub
Text.Text = Input(LOF(1), 1)
Close
End Sub
Private Sub Command1_Click()
GetFileToTextBox "C:Texto.txt", Text1
End Sub
Private Sub Command2_Click()
SaveTextBoxInFile "C:Texto.txt", Text1
End Sub
On Error Resume Next
Close
Open FileName For Output As #1
If Err > 0 Then Exit Sub
Print #1, Text.Text
Close
End Sub
Sub GetFileToTextBox(ByVal FileName As String, ByRef Text As TextBox)
On Error Resume Next
Close
Open FileName For Input As #1
If Err > 0 Then Exit Sub
Text.Text = Input(LOF(1), 1)
Close
End Sub
Private Sub Command1_Click()
GetFileToTextBox "C:Texto.txt", Text1
End Sub
Private Sub Command2_Click()
SaveTextBoxInFile "C:Texto.txt", Text1
End Sub