Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub cmdGuardar_Click()
- On Error GoTo ErrorDesconocido
- Open "C:\DATOS.DOC" For Output As #1
- Print #1, Text1.Text
- Close #1
- MsgBox ("Los datos han sido guardado.")
- Exit Sub
- ErrorDesconocido:
- MsgBox ("Ha ocurrido un error al intentar guardar el archivo.")
- End Sub
- Private Sub cmdLeer_Click()
- Dim Linea1, Linea2, Linea3, Linea4, Linea5, Linea6, Linea7, Linea8 As String
- Open "C:\DATOS.DOC" For Input As #1
- Line Input #1, Linea1
- Line Input #1, Linea2
- Line Input #1, Linea3
- Line Input #1, Linea4
- Line Input #1, Linea6
- Line Input #1, Linea7
- Line Input #1, Linea8
- Close #1
- Text1.Text = Linea1 & Chr(10) & Chr(13) & Linea2 & Chr(10) & Chr(13) & Linea3 & Chr(10) _
- & Chr(13) & Linea4 & Chr(10) & Chr(13) & Linea5 & Chr(10) & Chr(13) & Linea6 & Chr(10) _
- & Chr(13) & Linea7 & Chr(10) & Chr(13) & Linea8
- End Sub
- Private Sub cmdSalir_Click()
- End
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement