Que tal
Hice un codigo para tomar ciertos datos de una hoja (hoja1) y pegarlos en
otra de manera que inserte los renglones (para no escribir arriba de los
datos que ya existen) en otra hoja (hoja2).
sub pega()
Sheets("hoja2").Select
Range(conjunto).Select
Selection.Copy
Sheets("hoja1").Select
Range(uno1).Offset(1, 0).EntireRow.Select
Selection.Insert shift:=xlDown
Range(ActiveCell, ActiveCell.Offset(0, 12)).Select
Selection.Cut
ActiveCell.Offset(0, 1).Select
ActiveSheet.Paste
end sub
El problema es de cuando llega a la linea "Selection.Insert shift:=xlDown",
me da un mensaje de error:
ERROR 1004
to prevent possible loss of data, microsoft office excel can not shift
nonblank cells off the worksheet.
Try to locate the last nonblank cell by pressing ctrl+end, and delete or
clear all in the cells betwen the last cell and the end of your data, then
select cell A1 and save your workbook to reset the last cell used.
si algien me puede ayudar a saber que puedo hacer o modificar el macro...
muchas gracias.
Leer las respuestas