Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

crear doble archivo *.txt

publicado

Saludos Estimados, tengo una función que al imprimir me guarda información y datos de algunas celdas de un formulario abierto, en un archivo (dato2.txt), este archivo contiene mucha información que se ha almacenado desde hace mucho tiempo, este archivo de texto es abierto de vez en cuando para verificar la información allí guardada, pero en algunas ocasiones se ha visto modificado por las personas que lo abren, por lo que se me ocurre generar uno nuevo con la misma información, es decir tener dos archivos idénticos pero que la información se cargue idéntica, no hago copia y paste del archivo ya creado porque aunque la información guardada esta guardada, necesito el otro de respaldo, o si me dan otra idea de como crear este doble respaldo estaré gustoso de aceptar sus opiniones.

adjunto las instrucciones que me generan el respaldo permanente




Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim Archivotxt As String

Set fs = CreateObject("Scripting.FileSystemObject")
Archivotxt = "C:\Varios Excel\dato2.txt" '<---Ruta y nombre del Txt  creado

If Len(Dir(Archivotxt)) = 0 Then
Set a = fs.CreateTextFile(Archivotxt, True)
a.Close
End If

Set a = fs.OpenTextFile(Archivotxt, ?
texto = Range("T17").Value & " ; " & ActiveWorkbook.Name & " ; " & ActiveSheet.Name & " ; " & Range("f15").Value & " ; " & Format(Range("F17").Value, "dd/mm/yyyy") & " ; " & Format(Range("j17").Value, "h:mm:ss AM/PM")
a.WriteLine (texto) '<-----celda que se escribe en el Txt, se escribe en un renglon del txt
a.Close
Set fs = Nothing
Set Archivo = Nothing

 

 gracias de antemano

 

Featured Replies

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.