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.

Importar hoja a un libro de macros

publicado

Hola Soy Roberto y haciendo un trabajo me surgio la siguiente duda: La idea consiste en que con macros abro, desde mi Libro, un archivo excel, el cual después copio su unica hoja(importo) hacia mi libro que usa la macro.

El problema es que tengo una Restricción, la cual es que solo copia el archivo que tenga de nombre en su unica hoja como "Libro1", es decir, si se llama de otra forma, entonces no lo puedo importar.

Acá envio la macro que tengo, porfavor si me pueden ayudar :C

Sub copiarhoja1()

Set l1 = Workbooks("Programa Backlog")

With Application.FileDialog(msoFileDialogFilePicker)

.Title = "Seleccione archivo de excel"

.Filters.Add "Archivos excel", "*.xls*"

.AllowMultiSelect = False

.InitialFileName = ThisWorkbook.Path

If .Show Then

Set l2 = Workbooks.Open(.SelectedItems.Item(1))

l2.Sheets("Libro1").Range("A1:AZ500000").Copy l1.Sheets("Backlog").Range("A2")

End If

End With

l1.Activate

Sheets("Backlog").Select

End Sub

Featured Replies

publicado

__________________________________________________________________

Cambia:

l2.Sheets("Libro1").Range("A1:AZ500000").Copy l1.Sheets("Backlog").Range("A2")[/CODE]

Por:

[CODE]l2.Sheets(1).Range("A1:AZ500000").Copy l1.Sheets("Backlog").Range("A2")[/CODE]

___________________________________________________________________

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.