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.

En mi macros me aparece seleccione destino y presione entrar, y no realiza el pegado

publicado

Buen día a todos, les escribo debido a que acabo de crear una macro que copia y pega información de una hoja a otra, pero no llega a realizar la ultima tarea, que es pegar, y en lugar de hacer esto aparece en la barra inferior de la ventana el siguiente texto: "Seleccione el destino y presione entrar". Les agradezco mucho. Les adjunto el codigo:

Public Sub CommandButton1_Click()

Dim c As Object

'############################################################################################################

'PASO 1 BUSCAR LA ESTACIÓN EN LA COLUMNA DE ESTACIONES

dato = ComboBox1.Value

Set c = Sheets("Base").Range("A4: A400").Find(dato, LookIn:=xlValues, Lookat:=xlWhole)

If Not c Is Nothing Then

dire = c.Offset(1, 1).Address(False, False)

Range(dire).Select

Sheets("Base").Range(dire).Activate

End If

'############################################################################################################

'PASO 2, A PARTIR DE LA DIRECCION DE LA CELDA ENCONTRADA, IR A LA ULTIMA CELDA CON VALORES EN LA MISMA COLUMNA

'LUEGO DESPLAZARSE 150 COLUMNAS A LA DERECHA Y COPIAR EL RANGO ENTRE ESTAS CELDAS.

ActiveCell.End(xlDown).Activate

ActiveCell.Offset(1, 150).Activate

Range(c.Offset(1, 1).Address, ActiveCell).Select

Selection.Copy

'############################################################################################################

'PASO 3 BUSCAR LA HOJA SEGÚN EL VALOR DEL COMBOBOX

On Error GoTo error_hoja

Dim x As String

x = ComboBox1.Value

Sheets(x).Select

Range("A10").Activate

Do While ActiveCell <> Empty

ActiveCell.Offset(1, 0).Select

Loop

Exit Sub

error_hoja:

MsgBox "No existe la hoja"

'############################################################################################################

'PASO 4 BUSCAR LA ULTIMA FILA DE LA PRIMERA COLUMNA

Range("A10").Select

Do While ActiveCell <> Empty

ActiveCell.Offset(1, 0).Activate

Loop

End

'#############################################################################################################

'PASO 5 PEGAR EN LA ULTIMA CELDA EN BLANCO EL RANGO COPIADO

ActiveSheet.ActiveCell.Select.Paste

End

End Sub

Featured Replies

publicado

La forma correcta del método .Paste es: ActiveSheet.Paste

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.