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.

Bucle para abrir Archivos

publicado

Buenos dias colaboradores, me gustaria que me orientaran para poder ejecutar esta macro, sin la necesidad de crear

un nuevo libro y que ejecute un modulo despues de abrir el libro:

Sub Crea()Dim nombre, libro, nombre_final, libro_final As String


Set XL = CreateObject("Excel.Application")
XL.Visible = True
para = 0
a = 0


'Creamos el libro resultante
nombre_final = Cells(3, 3) & "." & Cells(2, 3)
libro_final = Cells(1, 3) & "\" & nombre_final


While (para = 0)
nombre = Cells(5 + a, 1)
libro = Cells(1, 3) & "\" & nombre

If nombre <> "" Then
XL.Workbooks.Open libro
If a = 0 Then XL.ActiveWorkbook.SaveAs libro_final, -4143
If a <> 0 Then
XL.Workbooks.Open libro

unir

XL.Workbooks(nombre).Close
End If
a = a + 1
End If
If nombre = "" Then
para = 1
XL.Workbooks(nombre_final).Close True
End If
Wend


XL.Quit
End Sub[/CODE]

Featured Replies

No hay posts para mostrar

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.