I am trying to do a simple copy-and-paste value from one Excel file to another using Excel VBA. I have the following code but it seems to copy-and-paste over the format as well. How can I specify it so it does paste value only? Thanks.
Sub PasteValue()
Set x = Workbooks.Open("workbook name 1")
Workbooks("workbook name 1").Sheets("sheet name 1").Range("A1:M10").Copy Workbooks("workbook name 2").Sheets("sheet name 2").Range("A1")
End Sub