Sub CopyRange()
Sheets("Sheet1").Range("C4:E4").Copy _
Destination:=Sheets("Sheet1").Range("G10")
End Sub
If Destination argument is omitted, Microsoft Excel copies the range to the Clipboard.
If you only want to copies value of the range (simulate copy paste specials value), you may use the following code:
Sub CopyPasteValue()
Sheets("Sheet1").Range("C4:E4").Copy
Sheets("Sheet1").Range("G10").PasteSpecial _
Paste:=xlPasteValues
End Sub
Thank you for reading this article Excel VBA Macro Example: Copying a range With URL https://x-tutorials.blogspot.com/2009/02/excel-vba-macro-example-copying-range.html. Also a time to read the other articles.
0 comments:
Write your comment for this article Excel VBA Macro Example: Copying a range above!