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.

Modificar un archivo .txt con una macro

publicado

Hola encontre este codigo que modifica un archivo .txt :

Sub prueba()

Dim intFich As Integer, lngNúmReg As Long, strCad As String * 1, n As Long

intFich = FreeFile(0)

Open "C:\Users\ran\Desktop\VALIDACION DOCUMENTACION\FILE_CGP.cgp" For Random As intFich Len = 1 'Sustituir por la ruta completa del fichero

For lngNúmReg = 1 To LOF(intFich)

Get intFich, lngNúmReg, strCad

If strCad = "," Then

LSet strCad = "-"

Put intFich, lngNúmReg, strCad

End If

Next lngNúmReg

Close intFich

End Sub

La funcion busca una , y lo reemplaza por ; ...necesito modificarlo para que busque en efecto una , pero lo remplace por 20 espacios en blanco, ya intente colocando en esta parte:

If strCad = "," Then

LSet strCad = " "

pero solo toma el primer espacio, es decir, reemplaza las comas solo por 1 espacio... alguien puede ayudarme??????

Featured Replies

publicado

Dim .............................., strCad As String * 20

LSet strCad = Space(20)

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.