The difference between the worksheet. Pasta and range. Pasta Special

I noticed that one difference between the two is that Worksheet.Paste will copy objects (charts, buttons, etc.), while Range.PasteSpecial xlPasteAll does not seem to do this. Are there any other differences? Is there a good explanation for the difference? So if I want to copy and paste objects / controls along with cells, do I need to do Worksheet.Paste ? What is annoying is that you have to activate this sheet and select the destination cell. Or is there a better approach? Thanks!

+4
source share
1 answer

You can manipulate any object in Excel (chart, form, controls, etc.).
It is advisable to always work directly on the object. Consider below.

 Dim sh As Shape Set sh = Sheet1.Shapes("Oval 1") sh.Copy With Sheet2 .Paste .Range("A1") End With 

In the above example, you want to copy the shape - Oval 1 to Sheet 1 in Sheet2 of cell A1.
So, we did to get the Shape object and use its method to accomplish what we want.

So, let Range.PasteSpecial serve its purpose as a method of a Range object and allow other objects to do the same as we did, which was higher, where we really do not need to use Select or Activate. Work shorter with objects using its available properties and methods.

+4
source

All Articles