Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/09/2006, 10:41
Avatar de Juanle455
Juanle455
 
Fecha de Ingreso: septiembre-2006
Ubicación: Via lactea
Mensajes: 248
Antigüedad: 18 años, 7 meses
Puntos: 2
Si quieres hacerlo con un archivo de texto, es muy sencillo, mira:

Código:
'Ejemplo sencillo
'Abrir y Guardar archivos de texto
'Crear dos Commands Button y escribir el codigo
'Tambien insertar un Text Box y un Common Dialog
'Abrir:

Private Sub Command1_Click()
CommonDialog1.Filter = "TXT Files (*.txt)|"
CommonDialog1.ShowOpen
If CommonDialog1.FileName <> "" Then
    Open CommonDialog1.FileName For Input As #1
    Do Until EOF(1)
    Line Input #1, lineoftext$
    alltext$ = alltext$ & lineoftext$
    Text1.Text = alltext$
    Loop
    Close #1
End If

End Sub

'Guardar
Private Sub Command2_Click()
CommonDialog1.Filter = "TXT Files (*.txt)|"
CommonDialog1.ShowSave
If CommonDialog1.FileName <> "" Then
    Open CommonDialog1.FileName For Output As #1
    Print #1, Text1.Text
    Close #1
End If

End Sub

Saludos