I want to copy the two best material, and as long as I do not copy the contents of its second Excellence ,
These are my comments:
as dim wbOrigen1 workbook, as _ wbOrigen2 workbook, _ wsDestino as Excel.Worksheet gives overwrite because the first copy of Excel, and, as _ wsOrigen1 Excel.Worksheet, as _ wsOrigen2 Excel.Worksheet, as _ rngOrigen1 Excel.Range, _ rngD As estino Excel.Range, _ rngDestino2 as Excel.Range, _ rngOrigen2 Excel.Range as
The problem here is
ThisWorkbook.Activate set rngDestino2 = wsDestino.Range (celdaDestino, range (celdaDestino) .End (xlDown) .Offset (1, 0)) range (celdaDestino) .End (xlDown) .Offset (1, 0) .Select wsOrigen2.Activate RngOrigen2.Select Range (Selection, Selection.End (xlDown)). Selection Range (Selection, Selection.End (xlToRight)). Select Selection.Copy ThisWorkbook. RngDestino2.Paste Activate Exclusive XLPast EValues Application.CutCopyMode = False
But it does not work the same way. It looks like rngDestino2
? Is RngDestino2 type wrong? Error. Description type disagreement
How can I fix this?
I like to address the selection, activate and avoid selection directly. Prices can be handled more efficiently by Paste Special, Direct Cell Move Transfer.
'Worksheet Wars is set correctly wsOrigen2 = & lt; Other workbooks & gt; Sheets ( "Sheet 1") sets wsDestino = ThisWorkbook.Sheets ( "Sheet1") with wsOrigen2.Cells (1, 1) .CurrentRegion wsDestino.Cells (Rows.Count, 1) .End (xlUp) _ .Offset (1 , 0) .Resize (.ows.Count, .Columns.Count) = .Cells.Value End Set wsDestino = None set wsOrigen2 = nothing
with
workbook are open And setting the worksheets properly, that should do this
Select and activate ways to answer more than activating See.
No comments:
Post a Comment