Solved VBA Paste Special with Destination

July 10, 2017 at 11:01:09
Specs: Windows 7
I Have This Code:
Worksheets("Template").Activate
'Definimos la ultimo celda para pegar los valores
UFila = Workbooks("Market Survey 2017.xlsm").Sheets("Sheet1").Range("A" & Rows.Count).End(xlUp).Offset(1, 0).Row
'Celdas a copiar
'---------------------------------------------------------------------------------------------------------------

'GENERALS
Sheets("Template").Range("H11").Copy Destination:=Workbooks("Market Survey 2017.xlsm").Sheets("Sheet1").Cells(UFila, "A")
Sheets("Template").Range("H13").Copy Destination:=Workbooks("Market Survey 2017.xlsm").Sheets("Sheet1").Cells(UFila, "B")
Sheets("Template").Range("H15").Copy Destination:=Workbooks("Market Survey 2017.xlsm").Sheets("Sheet1").Cells(UFila, "C")
Sheets("Template").Range("H17").Copy Destination:=Workbooks("Market Survey 2017.xlsm").Sheets("Sheet1").Cells(UFila, "D")
How Can I paste Values?


See More: VBA Paste Special with Destination

Reply ↓  Report •

#1
July 10, 2017 at 11:35:09
✔ Best Answer
First, a posting tip:

Please click on the blue line at the end of this post and read the instructions on how to post VBA code in this forum so that it is easier for us to read. Then edit/repost your code so that it looks similar to the example found via that link. Thanks!

As for your question...

Basically, a Copy/PasteSpecial operation needs to be done as 2 separate instructions, a .Copy instruction followed by a .PasteSpecial instruction that contains the destination range.

    Sheets("Template").Range("H11").Copy
    Workbooks("Market Survey 2017.xlsm").Sheets("Sheet1").Cells(UFila, "A").PasteSpecial _
          Paste:=xlPasteValues

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Reply ↓  Report •
Related Solutions


Ask Question