VBA/Excel/Access/Word/Excel/Copy Paste
Содержание
Copy and Paste can be carried out entirely by the Copy method
Sub copy()
range("A1:B3").copy Destination:=range("G4")
End Sub
Copy cells
Sub CopyHeads()
With Worksheets("Sheet1").Range("A1")
.Range(.Cells(1), .End(xlToRight)).Copy _
Destination:=Worksheets("Sheet2").Range("A1")
End With
End Sub
Overridden with the Destination parameter
Sub pasteDemo()
ActiveSheet.Paste Destination:=range("G4")
End Sub
Select current range and copy
Sub SelCurRegCopy()
Selection.CurrentRegion.Select
Selection.Copy
Range("A17").Select " Substitute your range here
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub